diff options
author | dan <dan.abramov@gmail.com> | 2024-12-03 01:11:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-03 01:11:11 +0000 |
commit | 996871d88ba3298ed53705a6c865cdfe5ede961a (patch) | |
tree | ee18ffe4de381589c0c5dd84a8d769b88360f99d /src/view/com/posts | |
parent | 2f10be2cfe0567516e6df06b0ca6429726a3e858 (diff) | |
download | voidsky-996871d88ba3298ed53705a6c865cdfe5ede961a.tar.zst |
Prefetch adjacent Home pages (#6904)
Diffstat (limited to 'src/view/com/posts')
-rw-r--r-- | src/view/com/posts/Feed.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
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 => { |