diff options
Diffstat (limited to 'src/state/queries/post-thread.ts')
-rw-r--r-- | src/state/queries/post-thread.ts | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/state/queries/post-thread.ts b/src/state/queries/post-thread.ts index c162c7267..551fedc8b 100644 --- a/src/state/queries/post-thread.ts +++ b/src/state/queries/post-thread.ts @@ -1,18 +1,22 @@ import { - AppBskyActorDefs, - AppBskyEmbedRecord, + type AppBskyActorDefs, + type AppBskyEmbedRecord, AppBskyFeedDefs, - AppBskyFeedGetPostThread, + type AppBskyFeedGetPostThread, AppBskyFeedPost, AtUri, moderatePost, - ModerationDecision, - ModerationOpts, + type ModerationDecision, + type ModerationOpts, } from '@atproto/api' -import {QueryClient, useQuery, useQueryClient} from '@tanstack/react-query' +import {type QueryClient, useQuery, useQueryClient} from '@tanstack/react-query' +import { + findAllPostsInQueryData as findAllPostsInExploreFeedPreviewsQueryData, + findAllProfilesInQueryData as findAllProfilesInExploreFeedPreviewsQueryData, +} from '#/state/queries/explore-feed-previews' import {findAllPostsInQueryData as findAllPostsInQuoteQueryData} from '#/state/queries/post-quotes' -import {UsePreferencesQueryResponse} from '#/state/queries/preferences/types' +import {type UsePreferencesQueryResponse} from '#/state/queries/preferences/types' import { findAllPostsInQueryData as findAllPostsInSearchQueryData, findAllProfilesInQueryData as findAllProfilesInSearchQueryData, @@ -495,6 +499,12 @@ export function* findAllPostsInQueryData( for (let post of findAllPostsInSearchQueryData(queryClient, uri)) { yield postViewToPlaceholderThread(post) } + for (let post of findAllPostsInExploreFeedPreviewsQueryData( + queryClient, + uri, + )) { + yield postViewToPlaceholderThread(post) + } } export function* findAllProfilesInQueryData( @@ -529,6 +539,12 @@ export function* findAllProfilesInQueryData( for (let profile of findAllProfilesInSearchQueryData(queryClient, did)) { yield profile } + for (let profile of findAllProfilesInExploreFeedPreviewsQueryData( + queryClient, + did, + )) { + yield profile + } } function* traverseThread(node: ThreadNode): Generator<ThreadNode, void> { |