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 postShadow = usePostShadow(post)
const {width, height} = useSafeAreaFrame() const {width, height} = useSafeAreaFrame()
const {onItemSeen} = useFeedFeedbackContext() const {sendInteraction} = useFeedFeedbackContext()
useEffect(() => { useEffect(() => {
let to: NodeJS.Timeout | null = null let to: NodeJS.Timeout | null = null
if (active && !to) { if (active && !to) {
to = setTimeout(() => { to = setTimeout(() => {
onItemSeen(post) sendInteraction({
item: post.uri,
event: 'app.bsky.feed.defs#interactionSeen',
})
}, 1000) }, 1000)
} else if (!active && to) { } else if (!active && to) {
clearTimeout(to) clearTimeout(to)
} }
}, [active, post, onItemSeen]) }, [active, post, sendInteraction])
return ( return (
<View style={[a.relative, {height, width}]}> <View style={[a.relative, {height, width}]}>