about summary refs log tree commit diff
path: root/src/state
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-12-07 17:16:39 -0800
committerGitHub <noreply@github.com>2023-12-07 17:16:39 -0800
commit448a403c81367c46b1323c4b545e02aaea0b92da (patch)
treeee3e63744ffa1dc27b459b10419bad28c32b3927 /src/state
parent7de5c341a92c1002af4c5321dfd7a8086c1609db (diff)
downloadvoidsky-448a403c81367c46b1323c4b545e02aaea0b92da.tar.zst
Stop using the cached notification page (#2142)
Diffstat (limited to 'src/state')
-rw-r--r--src/state/queries/notifications/feed.ts21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/state/queries/notifications/feed.ts b/src/state/queries/notifications/feed.ts
index b8d8d6160..a74670b5b 100644
--- a/src/state/queries/notifications/feed.ts
+++ b/src/state/queries/notifications/feed.ts
@@ -60,20 +60,13 @@ export function useNotificationFeedQuery(opts?: {enabled?: boolean}) {
     staleTime: STALE.INFINITY,
     queryKey: RQKEY(),
     async queryFn({pageParam}: {pageParam: RQPageParam}) {
-      let page
-      if (!pageParam) {
-        // for the first page, we check the cached page held by the unread-checker first
-        page = unreads.getCachedUnreadPage()
-      }
-      if (!page) {
-        page = await fetchPage({
-          limit: PAGE_SIZE,
-          cursor: pageParam,
-          queryClient,
-          moderationOpts,
-          threadMutes,
-        })
-      }
+      let page = await fetchPage({
+        limit: PAGE_SIZE,
+        cursor: pageParam,
+        queryClient,
+        moderationOpts,
+        threadMutes,
+      })
 
       // if the first page has an unread, mark all read
       if (!pageParam && page.items[0] && !page.items[0].notification.isRead) {