From 28dbc5f5e614b3caf08d36a7edaaf19a0ee0f0bc Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 21 Jul 2022 13:07:24 -0500 Subject: Add the ability to navigate to posts within a thread --- src/view/com/post-thread/PostThread.tsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/view/com/post-thread/PostThread.tsx') diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 7bbad36be..9622ceb49 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -78,6 +78,9 @@ export const PostThread = observer(function PostThread({ function* flattenThread( post: PostThreadViewPostModel, ): Generator { + if (post.parent) { + yield* flattenThread(post.parent) + } yield post if (post.replies?.length) { for (const reply of post.replies) { -- cgit 1.4.1