Point "Continue thread" at last shown post (#7060)
This commit is contained in:
@@ -421,9 +421,6 @@ export function PostThread({uri}: {uri: string | undefined}) {
|
|||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
} else if (isThreadPost(item)) {
|
} else if (isThreadPost(item)) {
|
||||||
if (!treeView && item.ctx.hasMoreSelfThread) {
|
|
||||||
return <PostThreadLoadMore post={item.post} />
|
|
||||||
}
|
|
||||||
const prev = isThreadPost(posts[index - 1])
|
const prev = isThreadPost(posts[index - 1])
|
||||||
? (posts[index - 1] as ThreadPost)
|
? (posts[index - 1] as ThreadPost)
|
||||||
: undefined
|
: undefined
|
||||||
@@ -436,6 +433,10 @@ export function PostThread({uri}: {uri: string | undefined}) {
|
|||||||
const hasUnrevealedParents =
|
const hasUnrevealedParents =
|
||||||
index === 0 && skeleton?.parents && maxParents < skeleton.parents.length
|
index === 0 && skeleton?.parents && maxParents < skeleton.parents.length
|
||||||
|
|
||||||
|
if (!treeView && prev && item.ctx.hasMoreSelfThread) {
|
||||||
|
return <PostThreadLoadMore post={prev.post} />
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
ref={item.ctx.isHighlightedPost ? highlightedPostRef : undefined}
|
ref={item.ctx.isHighlightedPost ? highlightedPostRef : undefined}
|
||||||
|
|||||||
Reference in New Issue
Block a user