Skip to content

Commit

Permalink
Limit feed prefetching to native (#7038)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Dec 10, 2024
1 parent 46e1e5c commit f34e8d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/view/com/feeds/FeedPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,14 @@ export function FeedPage({
})
}, [scrollToTop, feed, queryClient, setHasNew])

const shouldPrefetch = isNative && isPageAdjacent
return (
<View testID={testID}>
<MainScrollProvider>
<FeedFeedbackProvider value={feedFeedback}>
<Feed
testID={testID ? `${testID}-feed` : undefined}
enabled={isPageFocused || isPageAdjacent}
enabled={isPageFocused || shouldPrefetch}
feed={feed}
feedParams={feedParams}
pollInterval={POLL_FREQ}
Expand Down

0 comments on commit f34e8d8

Please sign in to comment.