Skip to content

Commit

Permalink
Point "Continue thread" at last shown post (#7060)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Dec 11, 2024
1 parent 48346ed commit 69f22b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/view/com/post-thread/PostThread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,6 @@ export function PostThread({uri}: {uri: string | undefined}) {
</View>
)
} else if (isThreadPost(item)) {
if (!treeView && item.ctx.hasMoreSelfThread) {
return <PostThreadLoadMore post={item.post} />
}
const prev = isThreadPost(posts[index - 1])
? (posts[index - 1] as ThreadPost)
: undefined
Expand All @@ -436,6 +433,10 @@ export function PostThread({uri}: {uri: string | undefined}) {
const hasUnrevealedParents =
index === 0 && skeleton?.parents && maxParents < skeleton.parents.length

if (!treeView && prev && item.ctx.hasMoreSelfThread) {
return <PostThreadLoadMore post={prev.post} />
}

return (
<View
ref={item.ctx.isHighlightedPost ? highlightedPostRef : undefined}
Expand Down

0 comments on commit 69f22b9

Please sign in to comment.