Add the ability to navigate to posts within a thread
This commit is contained in:
parent
139c9deb75
commit
28dbc5f5e6
7 changed files with 46 additions and 20 deletions
|
@ -78,6 +78,9 @@ export const PostThread = observer(function PostThread({
|
|||
function* flattenThread(
|
||||
post: PostThreadViewPostModel,
|
||||
): Generator<PostThreadViewPostModel, void> {
|
||||
if (post.parent) {
|
||||
yield* flattenThread(post.parent)
|
||||
}
|
||||
yield post
|
||||
if (post.replies?.length) {
|
||||
for (const reply of post.replies) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue