about summary refs log tree commit diff
path: root/src/view/com/post-thread
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-12-11 22:29:57 +0000
committerGitHub <noreply@github.com>2024-12-11 22:29:57 +0000
commit69f22b9dba41987763310c1adc4ac87d58d63334 (patch)
tree6747a069aa25851079374fb4c513ee9a02075933 /src/view/com/post-thread
parent48346edde606e8cb5cd2071a1a090610ff1670a9 (diff)
downloadvoidsky-69f22b9dba41987763310c1adc4ac87d58d63334.tar.zst
Point "Continue thread" at last shown post (#7060)
Diffstat (limited to 'src/view/com/post-thread')
-rw-r--r--src/view/com/post-thread/PostThread.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx
index d8c2ba118..477d77aff 100644
--- a/src/view/com/post-thread/PostThread.tsx
+++ b/src/view/com/post-thread/PostThread.tsx
@@ -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
@@ -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}