Perf: Include quote posts in the post-thread placeholder (#2104)

This commit is contained in:
Paul Frazee
2023-12-05 18:17:03 -08:00
committed by GitHub
parent accb25ccf2
commit 712cd3fde5
4 changed files with 96 additions and 1 deletions
+5
View File
@@ -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)
}
}
}
}