diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-16 18:27:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 18:27:05 -0800 |
commit | e358c3cc3045c70ed2d187c022aca185674c8274 (patch) | |
tree | 2aafe711b830910364a7f3aab474a0ffe55f681f /src/state/queries/notifications/feed.ts | |
parent | 357c752a213dbcf77e5333fa180cfef20a33842d (diff) | |
download | voidsky-e358c3cc3045c70ed2d187c022aca185674c8274.tar.zst |
Improve notification load behaviors (#1943)
* Dont use the stale cache for notifs-feed * Add a delay to marking all read to avoid marking upcoming posts as read * Trigger automatic notifications refresh when navigating to the tab, in certain conditions
Diffstat (limited to 'src/state/queries/notifications/feed.ts')
-rw-r--r-- | src/state/queries/notifications/feed.ts | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/state/queries/notifications/feed.ts b/src/state/queries/notifications/feed.ts index a47349827..d78370e07 100644 --- a/src/state/queries/notifications/feed.ts +++ b/src/state/queries/notifications/feed.ts @@ -12,7 +12,6 @@ import {getAgent} from '../../session' import {useModerationOpts} from '../preferences' import {shouldFilterNotif} from './util' import {useMutedThreads} from '#/state/muted-threads' -import {STALE} from '#/state/queries' const GROUPABLE_REASONS = ['like', 'repost', 'follow'] const PAGE_SIZE = 30 @@ -60,7 +59,6 @@ export function useNotificationFeedQuery(opts?: {enabled?: boolean}) { QueryKey, RQPageParam >({ - staleTime: STALE.INFINITY, queryKey: RQKEY(), async queryFn({pageParam}: {pageParam: RQPageParam}) { const res = await getAgent().listNotifications({ |