Add bookmarks to thread placeholder candidates (#10080)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
|||||||
dangerousGetPostShadow,
|
dangerousGetPostShadow,
|
||||||
updatePostShadow,
|
updatePostShadow,
|
||||||
} from '#/state/cache/post-shadow'
|
} from '#/state/cache/post-shadow'
|
||||||
|
import {findAllPostsInQueryData as findAllPostsInBookmarksQueryData} from '#/state/queries/bookmarks/useBookmarksQuery'
|
||||||
import {findAllPostsInQueryData as findAllPostsInExploreFeedPreviewsQueryData} from '#/state/queries/explore-feed-previews'
|
import {findAllPostsInQueryData as findAllPostsInExploreFeedPreviewsQueryData} from '#/state/queries/explore-feed-previews'
|
||||||
import {findAllPostsInQueryData as findAllPostsInNotifsQueryData} from '#/state/queries/notifications/feed'
|
import {findAllPostsInQueryData as findAllPostsInNotifsQueryData} from '#/state/queries/notifications/feed'
|
||||||
import {findAllPostsInQueryData as findAllPostsInFeedQueryData} from '#/state/queries/post-feed'
|
import {findAllPostsInQueryData as findAllPostsInFeedQueryData} from '#/state/queries/post-feed'
|
||||||
@@ -30,8 +31,11 @@ import {
|
|||||||
} from '#/state/queries/usePostThread/types'
|
} from '#/state/queries/usePostThread/types'
|
||||||
import {getRootPostAtUri} from '#/state/queries/usePostThread/utils'
|
import {getRootPostAtUri} from '#/state/queries/usePostThread/utils'
|
||||||
import {postViewToThreadPlaceholder} from '#/state/queries/usePostThread/views'
|
import {postViewToThreadPlaceholder} from '#/state/queries/usePostThread/views'
|
||||||
import {didOrHandleUriMatches, getEmbeddedPost} from '#/state/queries/util'
|
import {
|
||||||
import {embedViewRecordToPostView} from '#/state/queries/util'
|
didOrHandleUriMatches,
|
||||||
|
embedViewRecordToPostView,
|
||||||
|
getEmbeddedPost,
|
||||||
|
} from '#/state/queries/util'
|
||||||
|
|
||||||
export function createCacheMutator({
|
export function createCacheMutator({
|
||||||
queryClient,
|
queryClient,
|
||||||
@@ -258,6 +262,9 @@ export function* getThreadPlaceholderCandidates(
|
|||||||
for (let post of findAllPostsInSearchQueryData(queryClient, uri)) {
|
for (let post of findAllPostsInSearchQueryData(queryClient, uri)) {
|
||||||
yield postViewToThreadPlaceholder(post)
|
yield postViewToThreadPlaceholder(post)
|
||||||
}
|
}
|
||||||
|
for (let post of findAllPostsInBookmarksQueryData(queryClient, uri)) {
|
||||||
|
yield postViewToThreadPlaceholder(post)
|
||||||
|
}
|
||||||
for (let post of findAllPostsInExploreFeedPreviewsQueryData(
|
for (let post of findAllPostsInExploreFeedPreviewsQueryData(
|
||||||
queryClient,
|
queryClient,
|
||||||
uri,
|
uri,
|
||||||
|
|||||||
Reference in New Issue
Block a user