cache fix for search post results (#3520)
This commit is contained in:
parent
7d01ff90d3
commit
93731e6d6b
2 changed files with 37 additions and 22 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue