diff options
author | Hailey <me@haileyok.com> | 2024-04-12 17:31:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 17:31:55 -0700 |
commit | 93731e6d6bd345d8f45cd560e8185a60472cdf25 (patch) | |
tree | 59415ae7734540b432c8df778900dcd7bb82e8c5 /src/state/queries/post-thread.ts | |
parent | 7d01ff90d3a941b5d2b04783735608b5d37d0718 (diff) | |
download | voidsky-93731e6d6bd345d8f45cd560e8185a60472cdf25.tar.zst |
cache fix for search post results (#3520)
Diffstat (limited to 'src/state/queries/post-thread.ts')
-rw-r--r-- | src/state/queries/post-thread.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state/queries/post-thread.ts b/src/state/queries/post-thread.ts index dfc568b7d..521fc4751 100644 --- a/src/state/queries/post-thread.ts +++ b/src/state/queries/post-thread.ts @@ -8,6 +8,7 @@ import {QueryClient, useQuery, useQueryClient} from '@tanstack/react-query' import {UsePreferencesQueryResponse} from '#/state/queries/preferences/types' import {getAgent} 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' @@ -260,6 +261,9 @@ export function* findAllPostsInQueryData( for (let post of findAllPostsInNotifsQueryData(queryClient, uri)) { yield postViewToPlaceholderThread(post) } + for (let post of findAllPostsInSearchQueryData(queryClient, uri)) { + yield postViewToPlaceholderThread(post) + } } function* traverseThread(node: ThreadNode): Generator<ThreadNode, void> { |