diff --git a/app/src/component/fileItem/view.js b/app/src/component/fileItem/view.js index 1b28aea..d90a2c0 100644 --- a/app/src/component/fileItem/view.js +++ b/app/src/component/fileItem/view.js @@ -63,6 +63,8 @@ class FileItem extends React.PureComponent { const obscureNsfw = this.props.obscureNsfw && metadata && metadata.nsfw; const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id); const channelName = claim ? claim.channel_name : null; + const channelClaimId = claim && claim.value && claim.value.publisherSignature && claim.value.publisherSignature.certificateId; + const fullChannelUri = channelClaimId ? `${channelName}#${channelClaimId}` : channelName; const height = claim ? claim.height : null; return ( @@ -85,8 +87,7 @@ class FileItem extends React.PureComponent { {channelName && { - const channelUri = normalizeURI(channelName); - navigateToUri(navigation, channelUri); + navigateToUri(navigation, normalizeURI(fullChannelUri)); }} />} } diff --git a/app/src/component/fileList/view.js b/app/src/component/fileList/view.js index cb675ab..602910c 100644 --- a/app/src/component/fileList/view.js +++ b/app/src/component/fileList/view.js @@ -145,7 +145,15 @@ class FileList extends React.PureComponent { sortFunctions: {}; render() { - const { fileInfos, hideFilter, checkPending, navigation, style } = this.props; + const { + contentContainerStyle, + fileInfos, + hideFilter, + checkPending, + navigation, + onEndReached, + style + } = this.props; const { sortBy } = this.state; const items = []; @@ -170,7 +178,9 @@ class FileList extends React.PureComponent { return ( item} renderItem={({item}) => ( {this.formatTitle(title) || this.formatTitle(name)}} {channel && { - const channelUri = normalizeURI(channel); - navigateToUri(navigation, channelUri); + navigateToUri(navigation, normalizeURI(fullChannelUri)); }} />} diff --git a/app/src/page/channel/view.js b/app/src/page/channel/view.js index 62c90e2..14da275 100644 --- a/app/src/page/channel/view.js +++ b/app/src/page/channel/view.js @@ -11,7 +11,8 @@ import channelPageStyle from 'styles/channelPage'; class ChannelPage extends React.PureComponent { state = { - page: 1 + page: 1, + showPageButtons: false }; componentDidMount() { @@ -26,7 +27,7 @@ class ChannelPage extends React.PureComponent { handlePreviousPage = () => { const { uri, fetchClaims } = this.props; if (this.state.page > 1) { - this.setState({ page: this.state.page - 1 }, () => { + this.setState({ page: this.state.page - 1, showPageButtons: false }, () => { fetchClaims(uri, this.state.page); }); } @@ -35,7 +36,7 @@ class ChannelPage extends React.PureComponent { handleNextPage = () => { const { uri, fetchClaims, totalPages } = this.props; if (this.state.page < totalPages) { - this.setState({ page: this.state.page + 1 }, () => { + this.setState({ page: this.state.page + 1, showPageButtons: false }, () => { fetchClaims(uri, this.state.page); }); } @@ -69,7 +70,9 @@ class ChannelPage extends React.PureComponent { hideFilter fileInfos={claimsInChannel} navigation={navigation} - style={channelPageStyle.fileList} /> + style={channelPageStyle.fileList} + contentContainerStyle={channelPageStyle.fileListContent} + onEndReached={() => this.setState({ showPageButtons: true })} /> ) : ( No content found. @@ -81,7 +84,7 @@ class ChannelPage extends React.PureComponent { navigateBack(navigation, drawerStack, popDrawerStack)} /> {contentList} - {(totalPages > 1) && + {(totalPages > 1) && this.state.showPageButtons && {(this.state.page > 1) &&