diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-29 11:15:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 11:15:35 -0800 |
commit | 4b3ec54add3ddc4b6fc3a0045977c692bdb1842f (patch) | |
tree | 363dc6c6d6f885e0ec8252099fa1d2fc4d3c8169 /src/state/queries/notifications/unread.tsx | |
parent | 9239efac9c5339093f2742099b33834053635fc9 (diff) | |
download | voidsky-4b3ec54add3ddc4b6fc3a0045977c692bdb1842f.tar.zst |
Fix infinite query reloading behavior (reset, not invalidate) (#2031)
* Reset, not invalidate, notification queries * Reset, not invalidate, feed queries
Diffstat (limited to 'src/state/queries/notifications/unread.tsx')
-rw-r--r-- | src/state/queries/notifications/unread.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index d41cfee2e..e0510e79e 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -126,7 +126,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) { // update & broadcast setNumUnread(unreadCountStr) if (invalidate) { - queryClient.invalidateQueries({queryKey: RQKEY_NOTIFS()}) + queryClient.resetQueries({queryKey: RQKEY_NOTIFS()}) } broadcast.postMessage({event: unreadCountStr}) } catch (e) { |