From edac835f9e3dcc21b28a7250ae8198594a21aec5 Mon Sep 17 00:00:00 2001 From: Hailey Date: Sat, 18 Jan 2025 12:32:43 -0800 Subject: [PATCH] tweak feedback --- src/screens/VideoFeed/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index 6b46d3445a..8858c186c7 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -409,11 +409,11 @@ function VideoItem({ useEffect(() => { let to: NodeJS.Timeout | null = null - if (active) { + if (active && !to) { to = setTimeout(() => { onItemSeen(post) }, 1000) - } else if (to) { + } else if (!active && to) { clearTimeout(to) } }, [active, post, onItemSeen])