diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-25 04:17:35 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-07-28 16:45:36 +0200 |
commit | 31fc3be0a4342dbe91480d058b0afeddb272ed3b (patch) | |
tree | 162f87e81e2d37f5d5ad074f9de4a8b4c7fa2493 /app/javascript/flavours/glitch/reducers/suggestions.js | |
parent | bca3825c17dd2087f826d9269bb80537bd4ff395 (diff) |
[Glitch] Change account domain block to clear out notifications and follows
Port 4eeff26533b75b592395e353c6d4506db9958bcf to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/suggestions.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/suggestions.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/suggestions.js b/app/javascript/flavours/glitch/reducers/suggestions.js index 9f4b89d58..834be728f 100644 --- a/app/javascript/flavours/glitch/reducers/suggestions.js +++ b/app/javascript/flavours/glitch/reducers/suggestions.js @@ -4,6 +4,8 @@ import { SUGGESTIONS_FETCH_FAIL, SUGGESTIONS_DISMISS, } from '../actions/suggestions'; +import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'mastodon/actions/accounts'; +import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks'; import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable'; const initialState = ImmutableMap({ @@ -24,6 +26,11 @@ export default function suggestionsReducer(state = initialState, action) { return state.set('isLoading', false); case SUGGESTIONS_DISMISS: return state.update('items', list => list.filterNot(id => id === action.id)); + case ACCOUNT_BLOCK_SUCCESS: + case ACCOUNT_MUTE_SUCCESS: + return state.update('items', list => list.filterNot(id => id === action.relationship.id)); + case DOMAIN_BLOCK_SUCCESS: + return state.update('items', list => list.filterNot(id => action.accounts.includes(id))); default: return state; } |