diff --git a/package.json b/package.json index 61aaa7825..208d5b1bb 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "imagesloaded": "^4.1.4", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#6c0436cf140d2cc839f32ce1a780fc2068d55b85", + "lbry-redux": "lbryio/lbry-redux#b7ae238606587696f92718120a646a5965ee8ae9", "lbryinc": "lbryio/lbryinc#19260fac560daaa4be2d4af372f28109ea96ebf9", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/static/app-strings.json b/static/app-strings.json index 07c500e56..a411cd1e1 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -999,7 +999,7 @@ "Short": "Short", "How Fresh": "How Fresh", "This Default": "This Default", - "Sorry, your request returned no results or timed out. Modify your options or %again%": "Sorry, your request returned no results or timed out. Modify your options or %again%", + "Sorry, your request timed out. Modify your options or %again%": "Sorry, your request timed out. Modify your options or %again%", "Image": "Image", "Model": "Model", "Binary": "Binary", @@ -1085,5 +1085,6 @@ "Finnish": "Finnish", "Kannada": "Kannada", "Transcoding this %size%MB file should take under %processTime% %units%.": "Transcoding this %size%MB file should take under %processTime% %units%.", - "FFmpeg not configured. More in %settings_link%.": "FFmpeg not configured. More in %settings_link%." -} \ No newline at end of file + "FFmpeg not configured. More in %settings_link%.": "FFmpeg not configured. More in %settings_link%.", + "smallresult": "smallresult" +} diff --git a/ui/component/claimList/view.jsx b/ui/component/claimList/view.jsx index 9ae81fc16..e65827df4 100644 --- a/ui/component/claimList/view.jsx +++ b/ui/component/claimList/view.jsx @@ -32,6 +32,7 @@ type Props = { includeSupportAction?: boolean, hideBlock: boolean, injectedItem: ?Node, + timedOutMessage?: Node, }; export default function ClaimList(props: Props) { @@ -55,9 +56,11 @@ export default function ClaimList(props: Props) { includeSupportAction, hideBlock, injectedItem, + timedOutMessage, } = props; const [scrollBottomCbMap, setScrollBottomCbMap] = useState({}); const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW); + const timedOut = uris === null; const urisLength = (uris && uris.length) || 0; const sortedUris = (urisLength > 0 && (currentSort === SORT_NEW ? uris : uris.slice().reverse())) || []; @@ -157,9 +160,10 @@ export default function ClaimList(props: Props) { ))} )} - {urisLength === 0 && !loading && ( + {!timedOut && urisLength === 0 && !loading && (
{empty || __('No results')}
)} + {timedOut && timedOutMessage &&
{timedOutMessage}
} ); } diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index ab58fd60f..7d395c1c1 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -255,15 +255,20 @@ function ClaimListDiscover(props: Props) { const hasMatureTags = tagsParam && tagsParam.split(',').some(t => MATURE_TAGS.includes(t)); const claimSearchCacheQuery = createNormalizedClaimSearchKey(options); - const uris = claimSearchByQuery[claimSearchCacheQuery] || []; + const claimSearchResult = claimSearchByQuery[claimSearchCacheQuery]; + const shouldPerformSearch = - uris.length === 0 || + claimSearchResult === undefined || didNavigateForward || - (!loading && uris.length < CS.PAGE_SIZE * page && uris.length % CS.PAGE_SIZE === 0); + (!loading && + claimSearchResult && + claimSearchResult.length < CS.PAGE_SIZE * page && + claimSearchResult.length % CS.PAGE_SIZE === 0); + // Don't use the query from createNormalizedClaimSearchKey for the effect since that doesn't include page & release_time const optionsStringForEffect = JSON.stringify(options); - const noResults = ( + const timedOutMessage = (

- Sorry, your request returned no results or timed out. Modify your options or %again% + Sorry, your request timed out. Modify your options or %again%

@@ -587,14 +592,14 @@ function ClaimListDiscover(props: Props) {