add min view time to viewability config
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
|||||||
Pressable,
|
Pressable,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
View,
|
View,
|
||||||
|
ViewabilityConfig,
|
||||||
ViewToken,
|
ViewToken,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {
|
import {
|
||||||
@@ -145,6 +146,11 @@ export function VideoFeed({}: NativeStackScreenProps<
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const viewabilityConfig = {
|
||||||
|
itemVisiblePercentThreshold: 100,
|
||||||
|
minimumViewTime: 0,
|
||||||
|
} satisfies ViewabilityConfig
|
||||||
|
|
||||||
function Feed() {
|
function Feed() {
|
||||||
const {params} = useRoute<RouteProp<CommonNavigatorParams, 'VideoFeed'>>()
|
const {params} = useRoute<RouteProp<CommonNavigatorParams, 'VideoFeed'>>()
|
||||||
const isFocused = useIsFocused()
|
const isFocused = useIsFocused()
|
||||||
@@ -372,7 +378,7 @@ function Feed() {
|
|||||||
}}
|
}}
|
||||||
showsVerticalScrollIndicator={false}
|
showsVerticalScrollIndicator={false}
|
||||||
onViewableItemsChanged={onViewableItemsChanged}
|
onViewableItemsChanged={onViewableItemsChanged}
|
||||||
viewabilityConfig={{itemVisiblePercentThreshold: 100}}
|
viewabilityConfig={viewabilityConfig}
|
||||||
/>
|
/>
|
||||||
</GestureDetector>
|
</GestureDetector>
|
||||||
</FeedFeedbackProvider>
|
</FeedFeedbackProvider>
|
||||||
|
|||||||
Reference in New Issue
Block a user