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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 96 additions and 1 deletions

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)
}
}
}
}