Skip to content

Commit

Permalink
Invalidate query for list when blocking/unblocking
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed May 14, 2024
1 parent e1cb3d2 commit 5ecb70b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/state/queries/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {useToggleMutationQueue} from '#/lib/hooks/useToggleMutationQueue'
import {logEvent, LogEvents, toClout} from '#/lib/statsig/statsig'
import {Shadow} from '#/state/cache/types'
import {STALE} from '#/state/queries'
import {RQKEY as ListConvosQueryKey} from '#/state/queries/messages/list-converations'
import {resetProfilePostsQueries} from '#/state/queries/post-feed'
import {updateProfileShadow} from '../cache/profile-shadow'
import {useAgent, useSession} from '../session'
Expand Down Expand Up @@ -453,6 +454,7 @@ function useProfileBlockMutation() {
onSuccess(_, {did}) {
queryClient.invalidateQueries({queryKey: RQKEY_MY_BLOCKED()})
resetProfilePostsQueries(queryClient, did, 1000)
queryClient.invalidateQueries({queryKey: ListConvosQueryKey})
},
})
}
Expand All @@ -474,6 +476,7 @@ function useProfileUnblockMutation() {
},
onSuccess(_, {did}) {
resetProfilePostsQueries(queryClient, did, 1000)
queryClient.invalidateQueries({queryKey: ListConvosQueryKey})
},
})
}
Expand Down

0 comments on commit 5ecb70b

Please sign in to comment.