Fix homepage tiles not filtering blocked channels
## Ticket 7165 homepage queries don't take into account blocked channel ids (mute does) ## Changes resolveSearchOptions: was not grabbing redux data correctly.
This commit is contained in:
parent
085d7ad37a
commit
3c0750a2a0
1 changed files with 15 additions and 10 deletions
|
@ -20,15 +20,20 @@ import * as CS from 'constants/claim_search';
|
||||||
import ClaimListDiscover from './view';
|
import ClaimListDiscover from './view';
|
||||||
|
|
||||||
const select = (state, props) => {
|
const select = (state, props) => {
|
||||||
|
const showNsfw = selectShowMatureContent(state);
|
||||||
|
const hideReposts = makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state);
|
||||||
|
const mutedUris = selectMutedChannels(state);
|
||||||
|
const blockedUris = selectModerationBlockList(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
claimSearchByQuery: selectClaimSearchByQuery(state),
|
claimSearchByQuery: selectClaimSearchByQuery(state),
|
||||||
claimsByUri: selectClaimsByUri(state),
|
claimsByUri: selectClaimsByUri(state),
|
||||||
fetchingClaimSearchByQuery: selectFetchingClaimSearchByQuery(state),
|
fetchingClaimSearchByQuery: selectFetchingClaimSearchByQuery(state),
|
||||||
showNsfw: selectShowMatureContent(state),
|
showNsfw,
|
||||||
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
|
hideReposts,
|
||||||
mutedUris: selectMutedChannels(state),
|
mutedUris,
|
||||||
blockedUris: selectModerationBlockList(state),
|
blockedUris,
|
||||||
options: resolveSearchOptions({ pageSize: 8, ...props }),
|
options: resolveSearchOptions({ showNsfw, hideReposts, mutedUris, blockedUris, pageSize: 8, ...props }),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -45,14 +50,16 @@ export default withRouter(connect(select, perform)(ClaimListDiscover));
|
||||||
|
|
||||||
function resolveSearchOptions(props) {
|
function resolveSearchOptions(props) {
|
||||||
const {
|
const {
|
||||||
|
showNsfw,
|
||||||
|
hideReposts,
|
||||||
|
mutedUris,
|
||||||
|
blockedUris,
|
||||||
|
location,
|
||||||
pageSize,
|
pageSize,
|
||||||
claimType,
|
claimType,
|
||||||
tags,
|
tags,
|
||||||
showNsfw,
|
|
||||||
languages,
|
languages,
|
||||||
channelIds,
|
channelIds,
|
||||||
mutedUris,
|
|
||||||
blockedUris,
|
|
||||||
orderBy,
|
orderBy,
|
||||||
streamTypes,
|
streamTypes,
|
||||||
hasNoSource,
|
hasNoSource,
|
||||||
|
@ -60,10 +67,8 @@ function resolveSearchOptions(props) {
|
||||||
releaseTime,
|
releaseTime,
|
||||||
feeAmount,
|
feeAmount,
|
||||||
limitClaimsPerChannel,
|
limitClaimsPerChannel,
|
||||||
hideReposts,
|
|
||||||
timestamp,
|
timestamp,
|
||||||
claimIds,
|
claimIds,
|
||||||
location,
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const mutedAndBlockedChannelIds = Array.from(
|
const mutedAndBlockedChannelIds = Array.from(
|
||||||
|
|
Loading…
Reference in a new issue