don't pass blocked/muted to claim_search on the homepage to prevent double claim_search calls
if blockedList takes a while to return, the app would call claim_search once without the blocked list, then again with the block list. just hide them in the ui
This commit is contained in:
parent
84bab875bc
commit
88c5552352
2 changed files with 1 additions and 8 deletions
|
@ -1,7 +1,5 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { doClaimSearch, selectClaimSearchByQuery, selectFetchingClaimSearchByQuery, SETTINGS } from 'lbry-redux';
|
||||
import { selectMutedChannels } from 'redux/selectors/blocked';
|
||||
import { selectModerationBlockList } from 'redux/selectors/comments';
|
||||
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import ClaimListDiscover from './view';
|
||||
|
@ -11,8 +9,6 @@ const select = (state) => ({
|
|||
fetchingClaimSearchByQuery: selectFetchingClaimSearchByQuery(state),
|
||||
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
|
||||
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
|
||||
mutedUris: selectMutedChannels(state),
|
||||
blockedUris: selectModerationBlockList(state),
|
||||
});
|
||||
|
||||
const perform = {
|
||||
|
|
|
@ -39,8 +39,6 @@ function ClaimTilesDiscover(props: Props) {
|
|||
claimSearchByQuery,
|
||||
showNsfw,
|
||||
hideReposts,
|
||||
blockedUris,
|
||||
mutedUris,
|
||||
// Below are options to pass that are forwarded to claim_search
|
||||
tags,
|
||||
channelIds,
|
||||
|
@ -60,7 +58,6 @@ function ClaimTilesDiscover(props: Props) {
|
|||
const urlParams = new URLSearchParams(location.search);
|
||||
const feeAmountInUrl = urlParams.get('fee_amount');
|
||||
const feeAmountParam = feeAmountInUrl || feeAmount;
|
||||
const mutedAndBlockedChannelIds = Array.from(new Set(mutedUris.concat(blockedUris).map((uri) => uri.split('#')[1])));
|
||||
const options: {
|
||||
page_size: number,
|
||||
no_totals: boolean,
|
||||
|
@ -87,7 +84,7 @@ function ClaimTilesDiscover(props: Props) {
|
|||
not_tags: !showNsfw ? MATURE_TAGS : [],
|
||||
any_languages: languages,
|
||||
channel_ids: channelIds || [],
|
||||
not_channel_ids: mutedAndBlockedChannelIds || [],
|
||||
not_channel_ids: [],
|
||||
order_by: orderBy || ['trending_group', 'trending_mixed'],
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue