about summary refs log tree commit diff
path: root/src/view/screens/ProfileList.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-11-30 18:49:23 -0800
committerGitHub <noreply@github.com>2023-11-30 18:49:23 -0800
commit826cbbd4bf3a9a3cfb87b6dedee630e915b07b27 (patch)
tree36bdc8edbe3fafc2b1ce780f5a70788eaf97524f /src/view/screens/ProfileList.tsx
parent9fa90bb8d97db5078aedaa359d4b956d67e31ada (diff)
downloadvoidsky-826cbbd4bf3a9a3cfb87b6dedee630e915b07b27.tar.zst
Maintain some feed data to avoid needless glimmers (#2054)
Diffstat (limited to 'src/view/screens/ProfileList.tsx')
-rw-r--r--src/view/screens/ProfileList.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx
index ee0cdce29..1396b8269 100644
--- a/src/view/screens/ProfileList.tsx
+++ b/src/view/screens/ProfileList.tsx
@@ -55,6 +55,7 @@ import {cleanError} from '#/lib/strings/errors'
 import {useSession} from '#/state/session'
 import {useComposerControls} from '#/state/shell/composer'
 import {isWeb} from '#/platform/detection'
+import {truncateAndInvalidate} from '#/state/queries/util'
 
 const SECTION_TITLES_CURATE = ['Posts', 'About']
 const SECTION_TITLES_MOD = ['About']
@@ -128,10 +129,8 @@ function ProfileListScreenLoaded({
       list,
       onChange() {
         if (isCurateList) {
-          queryClient.resetQueries({
-            // TODO(eric) should construct these strings with a fn too
-            queryKey: FEED_RQKEY(`list|${list.uri}`),
-          })
+          // TODO(eric) should construct these strings with a fn too
+          truncateAndInvalidate(queryClient, FEED_RQKEY(`list|${list.uri}`))
         }
       },
     })