diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-30 18:49:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 18:49:23 -0800 |
commit | 826cbbd4bf3a9a3cfb87b6dedee630e915b07b27 (patch) | |
tree | 36bdc8edbe3fafc2b1ce780f5a70788eaf97524f /src/view/shell/bottom-bar | |
parent | 9fa90bb8d97db5078aedaa359d4b956d67e31ada (diff) | |
download | voidsky-826cbbd4bf3a9a3cfb87b6dedee630e915b07b27.tar.zst |
Maintain some feed data to avoid needless glimmers (#2054)
Diffstat (limited to 'src/view/shell/bottom-bar')
-rw-r--r-- | src/view/shell/bottom-bar/BottomBar.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx index a97ff8afc..746b4d123 100644 --- a/src/view/shell/bottom-bar/BottomBar.tsx +++ b/src/view/shell/bottom-bar/BottomBar.tsx @@ -32,6 +32,7 @@ import {emitSoftReset} from '#/state/events' import {useSession} from '#/state/session' import {useProfileQuery} from '#/state/queries/profile' import {RQKEY as NOTIFS_RQKEY} from '#/state/queries/notifications/feed' +import {truncateAndInvalidate} from '#/state/queries/util' type TabOptions = 'Home' | 'Search' | 'Notifications' | 'MyProfile' | 'Feeds' @@ -62,9 +63,7 @@ export function BottomBar({navigation}: BottomTabBarProps) { } else { if (tab === 'Notifications') { // fetch new notifs on view - queryClient.resetQueries({ - queryKey: NOTIFS_RQKEY(), - }) + truncateAndInvalidate(queryClient, NOTIFS_RQKEY()) } navigation.navigate(`${tab}Tab`) } |