Recommended: fix "no results found" flashing after search

## Cause
When 'selectRecommendedContentForUri' is filtering results against the blocklist, it relies on claim data which could be unresolved yet. It filters to empty results for this scenario, hence the flashing message.

## Change
Just return raw results when claims are not resolved yet, so that the GUI knows it needs to show the placeholders while resolving. After resolving, it'll go through the blocklist filtering again.
This commit is contained in:
infinite-persistence 2022-03-04 19:44:58 +08:00 committed by Thomas Zarebczan
parent de0bc8cf99
commit 4a5e967628

View file

@ -101,7 +101,9 @@ export const selectRecommendedContentForUri = createCachedSelector(
recommendedContent = searchResult['uris'].filter((searchUri) => {
const searchClaim = claimsByUri[searchUri];
if (!searchClaim) return;
if (!searchClaim) {
return true;
}
const signingChannel = searchClaim && searchClaim.signing_channel;
const channelUri = signingChannel && signingChannel.canonical_url;