From 996871d88ba3298ed53705a6c865cdfe5ede961a Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Tue, 3 Dec 2024 01:11:11 +0000
Subject: Prefetch adjacent Home pages (#6904)

---
 src/view/com/posts/Feed.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/view/com/posts/Feed.tsx')

diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx
index c623234b8..fb5484919 100644
--- a/src/view/com/posts/Feed.tsx
+++ b/src/view/com/posts/Feed.tsx
@@ -216,7 +216,7 @@ let Feed = ({
     checkForNewRef.current = checkForNew
   }, [checkForNew])
   React.useEffect(() => {
-    if (enabled) {
+    if (enabled && !disablePoll) {
       const timeSinceFirstLoad = Date.now() - lastFetchRef.current
       // DISABLED need to check if this is causing random feed refreshes -prf
       /*if (timeSinceFirstLoad > REFRESH_AFTER) {
@@ -231,7 +231,7 @@ let Feed = ({
         checkForNewRef.current()
       }
     }
-  }, [enabled, feed, queryClient, scrollElRef])
+  }, [enabled, disablePoll, feed, queryClient, scrollElRef])
   React.useEffect(() => {
     let cleanup1: () => void | undefined, cleanup2: () => void | undefined
     const subscription = AppState.addEventListener('change', nextAppState => {
-- 
cgit 1.4.1

