pl-fe: invalidate blocks/mutes list on block/mute
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -105,6 +105,10 @@ const useBlockAccountMutation = (accountId: string) => {
|
||||
? suggestions.filter((suggestion) => suggestion.account_id !== accountId)
|
||||
: undefined);
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['accountsLists', 'blocked'],
|
||||
});
|
||||
|
||||
// Pass in entire statuses map so we can use it to filter stuff in different parts of the reducers
|
||||
return dispatch<AccountsAction>((dispatch, getState) => dispatch({
|
||||
type: ACCOUNT_BLOCK_SUCCESS,
|
||||
@ -151,6 +155,10 @@ const useMuteAccountMutation = (accountId: string) => {
|
||||
? suggestions.filter((suggestion) => suggestion.account_id !== accountId)
|
||||
: undefined);
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['accountsLists', 'muted'],
|
||||
});
|
||||
|
||||
// Pass in entire statuses map so we can use it to filter stuff in different parts of the reducers
|
||||
return dispatch<AccountsAction>((dispatch, getState) => dispatch({
|
||||
type: ACCOUNT_MUTE_SUCCESS,
|
||||
|
||||
Reference in New Issue
Block a user