diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-05 18:17:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 18:17:03 -0800 |
commit | 712cd3fde55cca0444086e4512322832875d4836 (patch) | |
tree | cb8b59a4b4e46e5d96e9cba5179a9cd59de62293 /src/state/queries/notifications/feed.ts | |
parent | accb25ccf2f0a00a82ff54f0659abd46e0ac8284 (diff) | |
download | voidsky-712cd3fde55cca0444086e4512322832875d4836.tar.zst |
Perf: Include quote posts in the post-thread placeholder (#2104)
Diffstat (limited to 'src/state/queries/notifications/feed.ts')
-rw-r--r-- | src/state/queries/notifications/feed.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/state/queries/notifications/feed.ts b/src/state/queries/notifications/feed.ts index 16025f856..4d4c850ca 100644 --- a/src/state/queries/notifications/feed.ts +++ b/src/state/queries/notifications/feed.ts @@ -30,6 +30,7 @@ import {fetchPage} from './util' import {FeedPage} from './types' import {useMutedThreads} from '#/state/muted-threads' import {STALE} from '..' +import {embedViewRecordToPostView, getEmbeddedPost} from '../util' export type {NotificationType, FeedNotification, FeedPage} from './types' @@ -119,6 +120,10 @@ export function* findAllPostsInQueryData( if (item.subject?.uri === uri) { yield item.subject } + const quotedPost = getEmbeddedPost(item.subject.embed) + if (quotedPost?.uri === uri) { + yield embedViewRecordToPostView(quotedPost) + } } } } |