From db1653118315d1ea4daa7b15266104d4c81d8b54 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 14 Nov 2023 10:20:30 -0800 Subject: [PATCH 1/2] Avoid pollLatest loop --- src/view/com/posts/Feed.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx index 6cbad7f716..5c9d1ad2c1 100644 --- a/src/view/com/posts/Feed.tsx +++ b/src/view/com/posts/Feed.tsx @@ -106,6 +106,9 @@ export function Feed({ checkForNewRef.current = checkForNew }, [checkForNew]) React.useEffect(() => { + if (!pollInterval) { + return + } const i = setInterval(() => checkForNewRef.current?.(), pollInterval) return () => clearInterval(i) }, [pollInterval]) From fade3276a405cd06aa887ad8acf46e55d3fbd965 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 14 Nov 2023 10:20:40 -0800 Subject: [PATCH 2/2] Set poll interval on profile feeds --- src/view/screens/Profile.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index 1a2982027e..724c47c95d 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -350,6 +350,7 @@ const FeedSection = React.forwardRef(