diff options
author | Hailey <me@haileyok.com> | 2024-04-26 22:31:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-27 06:31:07 +0100 |
commit | 7eb1444f2c82cd25a77445b82178b7299e8452c7 (patch) | |
tree | c160dcafad17ec148f3d0e9b5b03cbf326255821 /src/state/queries/post-thread.ts | |
parent | ce85375c856549371e1e561e21bb5932baca8ea6 (diff) | |
download | voidsky-7eb1444f2c82cd25a77445b82178b7299e8452c7.tar.zst |
remove precacheThreadPostProfiles (#3729)
* remove `precacheThreadPostProfiles` * add `displayName` to `PreviewableUserAvatar` * memo * use `precacheProfile` * pass `profile` directly to `PreviewableUserAvatar` * update the `UserAvatar`'s props * remove feed cache * one more spot * rm unused queryClient * Don't call fn unnecessarily * Preload for display name too * try notification item * add to feeditem * and finally, precache for post threads * timestamp * Fix * onBeforePress --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/state/queries/post-thread.ts')
-rw-r--r-- | src/state/queries/post-thread.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/state/queries/post-thread.ts b/src/state/queries/post-thread.ts index 46c7445ba..133304d2e 100644 --- a/src/state/queries/post-thread.ts +++ b/src/state/queries/post-thread.ts @@ -11,7 +11,6 @@ import {useAgent} from '#/state/session' import {findAllPostsInQueryData as findAllPostsInSearchQueryData} from 'state/queries/search-posts' import {findAllPostsInQueryData as findAllPostsInNotifsQueryData} from './notifications/feed' import {findAllPostsInQueryData as findAllPostsInFeedQueryData} from './post-feed' -import {precacheThreadPostProfiles} from './profile' import {embedViewRecordToPostView, getEmbeddedPost} from './util' const RQKEY_ROOT = 'post-thread' @@ -73,9 +72,7 @@ export function usePostThreadQuery(uri: string | undefined) { async queryFn() { const res = await getAgent().getPostThread({uri: uri!}) if (res.success) { - const nodes = responseToThreadNodes(res.data.thread) - precacheThreadPostProfiles(queryClient, nodes) - return nodes + return responseToThreadNodes(res.data.thread) } return {type: 'unknown', uri: uri!} }, |