about summary refs log tree commit diff
path: root/src/screens/Hashtag.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-03-06 15:33:23 -0800
committerGitHub <noreply@github.com>2024-03-06 15:33:23 -0800
commit8b0e575f6423575c08e9a6748be41c888611d631 (patch)
treeadd2664a9edbb511a4c4c82d1732a973be7d9241 /src/screens/Hashtag.tsx
parent357b61d0a5573209214589112d5f0ac829fc6293 (diff)
downloadvoidsky-8b0e575f6423575c08e9a6748be41c888611d631.tar.zst
Adjust FlatList performance in main feeds (#3134)
* adjust flatlist perf settings

* calculate initial num to render based on screen height

* adjust window size

* don't react to screen height changes
Diffstat (limited to 'src/screens/Hashtag.tsx')
-rw-r--r--src/screens/Hashtag.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/screens/Hashtag.tsx b/src/screens/Hashtag.tsx
index 82ea75aa2..f1b817370 100644
--- a/src/screens/Hashtag.tsx
+++ b/src/screens/Hashtag.tsx
@@ -22,6 +22,7 @@ import {ArrowOutOfBox_Stroke2_Corner0_Rounded} from '#/components/icons/ArrowOut
 import {shareUrl} from 'lib/sharing'
 import {HITSLOP_10} from 'lib/constants'
 import {isNative} from 'platform/detection'
+import {useInitialNumToRender} from 'lib/hooks/useInitialNumToRender'
 
 const renderItem = ({item}: ListRenderItemInfo<PostView>) => {
   return <Post post={item} />
@@ -37,6 +38,7 @@ export default function HashtagScreen({
   const {tag, author} = route.params
   const setMinimalShellMode = useSetMinimalShellMode()
   const {_} = useLingui()
+  const initialNumToRender = useInitialNumToRender()
   const [isPTR, setIsPTR] = React.useState(false)
 
   const fullTag = React.useMemo(() => {
@@ -154,6 +156,8 @@ export default function HashtagScreen({
               onRetry={fetchNextPage}
             />
           }
+          initialNumToRender={initialNumToRender}
+          windowSize={11}
         />
       )}
     </>