diff options
Diffstat (limited to 'src/view/com/post-thread/PostThread.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThread.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index bbaa4efa2..0df505a74 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -90,14 +90,17 @@ export const PostThread = observer(function PostThread({ function* flattenThread( post: PostThreadViewPostModel, + isAscending = false, ): Generator<PostThreadViewPostModel, void> { if (post.parent) { - yield* flattenThread(post.parent) + yield* flattenThread(post.parent, true) } yield post if (post.replies?.length) { for (const reply of post.replies) { yield* flattenThread(reply) } + } else if (!isAscending && !post.parent && post.replyCount > 0) { + post._hasMore = true } } |