tweak feedback again
This commit is contained in:
@@ -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}]}>
|
||||||
|
|||||||
Reference in New Issue
Block a user