ea74a66dbd
* initial support for block/mute * hide blocked + muted content everywhere * add info message for blocked/muted characteristics * sort blocked list by most recent block first * add 'blocked' message on channel page for channels that you have blocked * cleanup * delete unused files * always pass mute/block list to claim_search on homepage * PR cleanup
13 lines
462 B
JavaScript
13 lines
462 B
JavaScript
// @flow
|
|
import { createSelector } from 'reselect';
|
|
|
|
const selectState = (state: { blocked: BlocklistState }) => state.blocked || {};
|
|
|
|
export const selectMutedChannels = createSelector(selectState, (state: BlocklistState) => {
|
|
return state.blockedChannels.filter((e) => typeof e === 'string');
|
|
});
|
|
|
|
export const makeSelectChannelIsMuted = (uri: string) =>
|
|
createSelector(selectMutedChannels, (state: Array<string>) => {
|
|
return state.includes(uri);
|
|
});
|