From 10d38a8d2650c433b1f93ca6dd091d306f499c17 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 25 Sep 2025 17:43:24 +0300 Subject: [PATCH] change flatlist config for explore page --- src/screens/Search/Explore.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/screens/Search/Explore.tsx b/src/screens/Search/Explore.tsx index c670a32dce..23eccf075a 100644 --- a/src/screens/Search/Explore.tsx +++ b/src/screens/Search/Explore.tsx @@ -1072,12 +1072,26 @@ export function Explore({ windowSize={platform({android: 11})} /** * Default: 10 + * + * NOTE: This was 1 on Android. Unfortunately this leads to the list totally freaking out + * when the sticky headers changed. I made a minimal reproduction and yeah, it's this prop. + * Totally fine when the sticky headers are static, but when they're dynamic, it's a mess. + * + * Repro: https://github.com/mozzius/stickyindices-repro + * + * I then found doubling this prop on iOS also reduced it freaking out there as well. + * + * Trades off seeing more blank space due to it having to render more items before it can show anything. + * -sfn */ - maxToRenderPerBatch={platform({android: 1})} + maxToRenderPerBatch={platform({android: 10, ios: 20})} /** * Default: 50 + * + * NOTE: This was 25 on Android. However, due to maxToRenderPerBatch being set to 10, + * the lower batching period is no longer necessary (?) */ - updateCellsBatchingPeriod={platform({android: 25})} + updateCellsBatchingPeriod={50} refreshing={isPTR} onRefresh={onPTR} />