From e0a04afea4326173a5580c4c688ec5de895fa668 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt <sean@lbry.io> Date: Fri, 24 Jan 2020 15:43:07 -0500 Subject: [PATCH] only pass not_channel_ids if there are no channel_ids passed in to claim_search --- ui/component/claimListDiscover/view.jsx | 4 +++- ui/component/claimTilesDiscover/view.jsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index 89b5175e5..36b762a9d 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -91,7 +91,9 @@ function ClaimListDiscover(props: Props) { no_totals: true, any_tags: tags || [], channel_ids: channelIds || [], - not_channel_ids: hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [], + not_channel_ids: + // If channelIds were passed in, we don't need not_channel_ids + !channelIds && hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [], not_tags: !showNsfw ? MATURE_TAGS : [], order_by: typeSort === TYPE_TRENDING diff --git a/ui/component/claimTilesDiscover/view.jsx b/ui/component/claimTilesDiscover/view.jsx index 10eb1ddf6..1d297f558 100644 --- a/ui/component/claimTilesDiscover/view.jsx +++ b/ui/component/claimTilesDiscover/view.jsx @@ -60,7 +60,9 @@ function ClaimTilesDiscover(props: Props) { any_tags: tags || [], not_tags: !showNsfw ? MATURE_TAGS : [], channel_ids: channelIds || [], - not_channel_ids: hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [], + not_channel_ids: + // If channelIds were passed in, we don't need not_channel_ids + !channelIds && hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [], order_by: orderBy || ['trending_group', 'trending_mixed'], };