tweak feedback again

This commit is contained in:
Hailey
2025-01-18 13:13:29 -08:00
parent edac835f9e
commit 3443b42bfb
+6 -3
View File
@@ -405,18 +405,21 @@ function VideoItem({
}) {
const postShadow = usePostShadow(post)
const {width, height} = useSafeAreaFrame()
const {onItemSeen} = useFeedFeedbackContext()
const {sendInteraction} = useFeedFeedbackContext()
useEffect(() => {
let to: NodeJS.Timeout | null = null
if (active && !to) {
to = setTimeout(() => {
onItemSeen(post)
sendInteraction({
item: post.uri,
event: 'app.bsky.feed.defs#interactionSeen',
})
}, 1000)
} else if (!active && to) {
clearTimeout(to)
}
}, [active, post, onItemSeen])
}, [active, post, sendInteraction])
return (
<View style={[a.relative, {height, width}]}>