diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-06-11 11:30:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 11:30:38 -0700 |
commit | 46e12c6d34897fab77e039b1acb13b88a4b97a80 (patch) | |
tree | 819a9dfd019202087c9c1794fc674413eaf4e8e1 /src/view/com/post-thread/PostThread.tsx | |
parent | 4b6609d48b41cdc5be6fb957ea396e8aba18b1b6 (diff) | |
download | voidsky-46e12c6d34897fab77e039b1acb13b88a4b97a80.tar.zst |
Improve thread loading (#4402)
* Increase the number of posts loaded when a self-thread is present * Increase depth to 10, detect cutoffs on self-threads and show continue link * Stacky the avis
Diffstat (limited to 'src/view/com/post-thread/PostThread.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThread.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 35028334c..8061eb11c 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -34,6 +34,7 @@ import {ComposePrompt} from '../composer/Prompt' import {List, ListMethods} from '../util/List' import {ViewHeader} from '../util/ViewHeader' import {PostThreadItem} from './PostThreadItem' +import {PostThreadLoadMore} from './PostThreadLoadMore' import {PostThreadShowHiddenReplies} from './PostThreadShowHiddenReplies' // FlatList maintainVisibleContentPosition breaks if too many items @@ -364,6 +365,9 @@ export function PostThread({ </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 |