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
This commit is contained in:
parent
4b6609d48b
commit
46e12c6d34
3 changed files with 112 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue