diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-11 13:53:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 13:53:37 -0800 |
commit | 99cf6b626fd955b94bde04c2153cbe8bad53699d (patch) | |
tree | 670015b6d4ffac1823b2c85a72e9d4991e7c76fc /src/state/queries/notifications/unread.tsx | |
parent | ab04074197f8432a3d502ca2393beca3b8f6ca97 (diff) | |
download | voidsky-99cf6b626fd955b94bde04c2153cbe8bad53699d.tar.zst |
Additional reductions in request traffic (#2169)
* Dont poll for new content on profiles * Drop the whenAppReady query after new post to reduce traffic overhead * Reduce getPosts calls in notifs to only use them when needed
Diffstat (limited to 'src/state/queries/notifications/unread.tsx')
-rw-r--r-- | src/state/queries/notifications/unread.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index ba38463f2..a189f20e4 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -102,6 +102,10 @@ export function Provider({children}: React.PropsWithChildren<{}>) { queryClient, moderationOpts, threadMutes, + + // only fetch subjects when the page is going to be used + // in the notifications query, otherwise skip it + fetchAdditionalData: !!invalidate, }) const unreadCount = countUnread(page) const unreadCountStr = |