Skip to content

Commit

Permalink
dms: fixing bad query key
Browse files Browse the repository at this point in the history
  • Loading branch information
arthyn committed Nov 17, 2023
1 parent 494e590 commit 8503472
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ui/src/state/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1128,8 +1128,10 @@ export function useSendReplyMutation() {
const infiniteQueryKey = ['dms', whom, 'infinite'];
const parentWritQueryKey = ['dms', whom, parentId];

queryClient.refetchQueries(parentWritQueryKey);
queryClient.invalidateQueries(infiniteQueryKey);
queryClient.invalidateQueries(parentWritQueryKey, {
refetchType: 'none',
});
queryClient.invalidateQueries(infiniteQueryKey, { refetchType: 'none' });
},
});
}
Expand Down Expand Up @@ -1448,10 +1450,7 @@ export function useHasUnreadMessages() {
}

export function useWrit(whom: string, writId: string, disabled = false) {
const queryKey = useMemo(
() => ['dms', whom, 'writs', writId],
[whom, writId]
);
const queryKey = useMemo(() => ['dms', whom, writId], [whom, writId]);

const scryPath = useMemo(() => {
const suffix = `/writs/writ/id/${writId}`;
Expand Down

0 comments on commit 8503472

Please sign in to comment.