diff --git a/src/component/claimList/view.js b/src/component/claimList/view.js index bb623a8..10911ca 100644 --- a/src/component/claimList/view.js +++ b/src/component/claimList/view.js @@ -144,10 +144,6 @@ class ClaimList extends React.PureComponent { }; handleVerticalEndReached = () => { - if (this.state.lastPageReached) { - return; - } - // fetch more content const { channelIds, @@ -161,8 +157,13 @@ class ClaimList extends React.PureComponent { uris, } = this.props; const { subscriptionsView, trendingForAllView } = this.state; - if ((claimSearchUris && claimSearchUris.length >= softLimit) || (uris && uris.length >= softLimit)) { - // don't fetch more than the specified limit to be displayed + + if ( + this.state.lastPageReached || + (claimSearchUris && + (claimSearchUris.length < Constants.DEFAULT_PAGE_SIZE || claimSearchUris.length >= softLimit)) || + (uris && uris.length >= softLimit) + ) { return; } @@ -219,6 +220,12 @@ class ClaimList extends React.PureComponent { ); }; + verticalListEmptyComponent = () => { + return ( + No content to display at this time. Please check back later. + ); + }; + renderVerticalItem = ({ item }) => { const { navigation } = this.props; return ; @@ -259,16 +266,6 @@ class ClaimList extends React.PureComponent { if (Constants.ORIENTATION_VERTICAL === orientation) { const data = subscriptionsView || trendingForAllView ? claimSearchUris : uris; - if (!loading && !claimSearchLoading && (!data || data.length === 0)) { - return ( - - - No content to display at this time. Please check back later. - - - ); - } - return ( Related Content {recommendedContent && - recommendedContent.map(recommendedUri => ( - - ))} + recommendedContent + .filter(recommendedUri => recommendedUri !== normalizeURI(fullUri)) + .map(recommendedUri => ( + + ))} {isSearching && ( )} diff --git a/src/page/file/view.js b/src/page/file/view.js index 6212149..5e8328e 100644 --- a/src/page/file/view.js +++ b/src/page/file/view.js @@ -637,6 +637,7 @@ class FilePage extends React.PureComponent { (completed || (fileInfo && !fileInfo.stopped && fileInfo.written_bytes < fileInfo.total_bytes)); const channelClaimId = claim && claim.signing_channel && claim.signing_channel.claim_id; const canSendTip = this.state.tipAmount > 0; + const fullUri = `${claim.name}#${claim.claim_id}`; const fullChannelUri = channelClaimId && channelClaimId.trim().length > 0 ? normalizeURI(`${channelName}#${channelClaimId}`) @@ -959,7 +960,7 @@ class FilePage extends React.PureComponent { {costInfo && parseFloat(costInfo.cost) > balance && } - + )}