From 37bba441ed6fb08bc91fbd33948ac71b5df30c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Mon, 27 Oct 2025 12:02:18 +0100 Subject: [PATCH] pl-fe: invalidate blocks/mutes list on block/mute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-fe/src/queries/accounts/use-relationship.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/pl-fe/src/queries/accounts/use-relationship.ts b/packages/pl-fe/src/queries/accounts/use-relationship.ts index 403580700..cabb3c8e3 100644 --- a/packages/pl-fe/src/queries/accounts/use-relationship.ts +++ b/packages/pl-fe/src/queries/accounts/use-relationship.ts @@ -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((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((dispatch, getState) => dispatch({ type: ACCOUNT_MUTE_SUCCESS,