diff --git a/src/page/discover/view.js b/src/page/discover/view.js index e5a46aa..ba3806f 100644 --- a/src/page/discover/view.js +++ b/src/page/discover/view.js @@ -291,25 +291,27 @@ class DiscoverPage extends React.PureComponent { ); render() { - const { navigation, sortByItem, timeItem } = this.props; + const { currentRoute, navigation, sortByItem, timeItem } = this.props; const { orderBy, showModalTagSelector, showSortPicker, showTimePicker } = this.state; return ( - item} - /> + {currentRoute !== Constants.ROUTE_FILE && currentRoute !== Constants.DRAWER_ROUTE_FILE_VIEW && ( + item} + /> + )} {!showModalTagSelector && !showSortPicker && !showTimePicker && ( )} diff --git a/src/page/file/index.js b/src/page/file/index.js index 83d83c9..fb7ba88 100644 --- a/src/page/file/index.js +++ b/src/page/file/index.js @@ -27,7 +27,6 @@ import { selectPurchasedUris, selectFailedPurchaseUris, selectPurchaseUriErrorMessage, - selectIsSearching, } from 'lbry-redux'; import { doClaimEligiblePurchaseRewards, @@ -70,7 +69,6 @@ const select = (state, props) => { streamingUrl: makeSelectStreamingUrlForUri(contentUri)(state), thumbnail: makeSelectThumbnailForUri(contentUri)(state), title: makeSelectTitleForUri(contentUri)(state), - isSearchingRecommendContent: selectIsSearching(state), viewCount: makeSelectViewCountForUri(contentUri)(state), }; }; diff --git a/src/page/file/view.js b/src/page/file/view.js index 3150cbc..309204f 100644 --- a/src/page/file/view.js +++ b/src/page/file/view.js @@ -238,10 +238,42 @@ class FilePage extends React.PureComponent { const { fileInfo: prevFileInfo } = this.props; const { fileInfo } = nextProps; - return ( - Object.keys(this.difference(nextProps, this.props)).length > 0 || - Object.keys(this.difference(nextState, this.state)).length > 0 - ); + const propKeyTriggers = ['balance', 'viewCount', 'isResolvingUri']; + const stateKeyTriggers = [ + 'downloadPressed', + 'fullscreenMode', + 'mediaLoaded', + 'playerBgHeighht', + 'playerHeight', + 'relatedY', + 'showTipView', + 'showImageViewer', + 'showWebView', + 'showDescription', + 'showRecommended', + 'uri', + ]; + for (let i = 0; i < propKeyTriggers.length; i++) { + const key = propKeyTriggers[i]; + if (this.props[key] !== nextProps[key]) { + return true; + } + } + for (let i = 0; i < stateKeyTriggers.length; i++) { + const key = stateKeyTriggers[i]; + if (this.state[key] !== nextState[key]) { + return true; + } + } + + if (!prevFileInfo && fileInfo) { + return true; + } + if (prevFileInfo && fileInfo && Object.keys(this.difference(fileInfo, prevFileInfo)).length > 0) { + return true; + } + + return false; } componentDidUpdate(prevProps, prevState) {