From 3974ca6322bfe357ef2f49b0a8be21131b55e937 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Fri, 25 Feb 2022 12:48:00 +0800 Subject: [PATCH] ClaimListDiscover: if 'uris' is given, there is no need to perform a search This was causing unnecessary calls that won't be used. --- ui/component/claimListDiscover/view.jsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index 9e94fa2a0..d508deb25 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -465,14 +465,15 @@ function ClaimListDiscover(props: Props) { } const shouldPerformSearch = - claimSearchResult === undefined || - didNavigateForward || - (!loading && - !claimSearchResultLastPageReached && - claimSearchResult && - claimSearchResult.length && - claimSearchResult.length < dynamicPageSize * options.page && - claimSearchResult.length % dynamicPageSize === 0); + !uris && + (claimSearchResult === undefined || + didNavigateForward || + (!loading && + !claimSearchResultLastPageReached && + claimSearchResult && + claimSearchResult.length && + claimSearchResult.length < dynamicPageSize * options.page && + claimSearchResult.length % dynamicPageSize === 0)); // Don't use the query from createNormalizedClaimSearchKey for the effect since that doesn't include page & release_time const optionsStringForEffect = JSON.stringify(options);