From 4f5f80f6ddf78441b4c8226227f89402d20e6af9 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 18 Jan 2025 19:04:01 +0000 Subject: [PATCH] add min view time to viewability config --- src/screens/VideoFeed/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index 54fdb787b2..bf28481922 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -5,6 +5,7 @@ import { Pressable, ScrollView, View, + ViewabilityConfig, ViewToken, } from 'react-native' import { @@ -145,6 +146,11 @@ export function VideoFeed({}: NativeStackScreenProps< ) } +const viewabilityConfig = { + itemVisiblePercentThreshold: 100, + minimumViewTime: 0, +} satisfies ViewabilityConfig + function Feed() { const {params} = useRoute>() const isFocused = useIsFocused() @@ -372,7 +378,7 @@ function Feed() { }} showsVerticalScrollIndicator={false} onViewableItemsChanged={onViewableItemsChanged} - viewabilityConfig={{itemVisiblePercentThreshold: 100}} + viewabilityConfig={viewabilityConfig} />