diff --git a/app/src/assets/default_avatar.jpg b/app/src/assets/default_avatar.jpg new file mode 100644 index 00000000..2cffd3af Binary files /dev/null and b/app/src/assets/default_avatar.jpg differ diff --git a/app/src/assets/default_channel_cover.png b/app/src/assets/default_channel_cover.png new file mode 100644 index 00000000..9b49120a Binary files /dev/null and b/app/src/assets/default_channel_cover.png differ diff --git a/app/src/constants.js b/app/src/constants.js index 6a978084..07ab3e5b 100644 --- a/app/src/constants.js +++ b/app/src/constants.js @@ -4,6 +4,9 @@ const Constants = { FIRST_RUN_PAGE_WALLET: "wallet", FIRST_RUN_PAGE_SKIP_ACCOUNT: "skip-account", + CONTENT_TAB: "content", + ABOUT_TAB: "about", + KEY_FIRST_RUN_EMAIL: "firstRunEmail", KEY_FIRST_RUN_PASSWORD: "firstRunPassword", KEY_SHOULD_VERIFY_EMAIL: "shouldVerifyEmail", diff --git a/app/src/page/channel/index.js b/app/src/page/channel/index.js index c84e966a..42a6ae64 100644 --- a/app/src/page/channel/index.js +++ b/app/src/page/channel/index.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; import { doFetchClaimsByChannel, - doFetchClaimCountByChannel, makeSelectClaimForUri, makeSelectClaimsInChannelForCurrentPageState, makeSelectFetchingChannelClaims, @@ -21,7 +20,6 @@ const select = (state, props) => ({ const perform = dispatch => ({ fetchClaims: (uri, page) => dispatch(doFetchClaimsByChannel(uri, page)), - fetchClaimCount: uri => dispatch(doFetchClaimCountByChannel(uri)), popDrawerStack: () => dispatch(doPopDrawerStack()) }); diff --git a/app/src/page/channel/view.js b/app/src/page/channel/view.js index c4329e65..344311eb 100644 --- a/app/src/page/channel/view.js +++ b/app/src/page/channel/view.js @@ -1,9 +1,20 @@ // @flow import React from 'react'; -import { ActivityIndicator, Text, View } from 'react-native'; +import { + ActivityIndicator, + Dimensions, + Image, + ScrollView, + Text, + TouchableOpacity, + View +} from 'react-native'; +import { TabView, SceneMap } from 'react-native-tab-view'; import { navigateBack } from 'utils/helper'; import Colors from 'styles/colors'; +import Constants from 'constants'; import Button from 'component/button'; +import Link from 'component/link'; import FileList from 'component/fileList'; import PageHeader from 'component/pageHeader'; import SubscribeButton from 'component/subscribeButton'; @@ -13,7 +24,8 @@ import channelPageStyle from 'styles/channelPage'; class ChannelPage extends React.PureComponent { state = { page: 1, - showPageButtons: false + showPageButtons: false, + activeTab: Constants.CONTENT_TAB }; componentDidMount() { @@ -21,7 +33,6 @@ class ChannelPage extends React.PureComponent { if (!claimsInChannel || !claimsInChannel.length) { fetchClaims(uri, page || this.state.page); - fetchClaimCount(uri); } } @@ -43,18 +54,8 @@ class ChannelPage extends React.PureComponent { } } - render() { - const { - fetching, - claimsInChannel, - claim, - navigation, - totalPages, - uri, - drawerStack, - popDrawerStack - } = this.props; - const { name, permanent_url: permanentUrl } = claim; + renderContent = () => { + const { fetching, claimsInChannel, totalPages, navigation } = this.props; let contentList; if (fetching) { @@ -81,15 +82,9 @@ class ChannelPage extends React.PureComponent { ); } - return ( - - - - {name} - - - {contentList} - {(totalPages > 1) && this.state.showPageButtons && + let pageButtons; + if (totalPages > 1 && this.state.showPageButtons) { + pageButtons = ( {(this.state.page > 1) &&