Perf: Dont initial-render full thread on mobile (#2101)

zio/stable
Paul Frazee 2023-12-05 18:02:33 -08:00 committed by GitHub
parent 826b841e10
commit accb25ccf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -322,7 +322,7 @@ function PostThreadLoaded({
<FlatList <FlatList
ref={ref} ref={ref}
data={posts} data={posts}
initialNumToRender={posts.length} initialNumToRender={!isNative ? posts.length : undefined}
maintainVisibleContentPosition={ maintainVisibleContentPosition={
!needsScrollAdjustment.current !needsScrollAdjustment.current
? MAINTAIN_VISIBLE_CONTENT_POSITION ? MAINTAIN_VISIBLE_CONTENT_POSITION