diff --git a/src/state/queries/profile.ts b/src/state/queries/profile.ts index 069fe76780..526a9df8f3 100644 --- a/src/state/queries/profile.ts +++ b/src/state/queries/profile.ts @@ -42,6 +42,7 @@ import { ProgressGuideAction, useProgressGuideControls, } from '../shell/progress-guide' +import {RQKEY_ROOT as RQKEY_LIST_CONVOS} from './messages/list-conversations' import {RQKEY as RQKEY_MY_BLOCKED} from './my-blocked-accounts' import {RQKEY as RQKEY_MY_MUTED} from './my-muted-accounts' @@ -527,6 +528,11 @@ export function useProfileBlockMutationQueue( updateProfileShadow(queryClient, did, { blockingUri: finalBlockingUri, }) + // The shadow only reaches components that read profiles through shadow + // hooks. The convo list is also read raw (e.g. the unread badge's + // calculateCount, getMessageInfo), and blocks emit no chat log event, + // so without a refetch that data stays stale indefinitely. + void queryClient.invalidateQueries({queryKey: [RQKEY_LIST_CONVOS]}) }, })