about summary refs log tree commit diff
path: root/src/view/com/feeds/FeedPage.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-01 15:40:50 -0600
committerGitHub <noreply@github.com>2023-12-01 13:40:50 -0800
commit9dec9d72768c6217a3878c80b11cbbd3d9ed0ff9 (patch)
treec4e131576171c1289bdf5f95b018ee2003666be8 /src/view/com/feeds/FeedPage.tsx
parentf80bd30ef47ff1959e97ca8cb7652c98d115c0ab (diff)
downloadvoidsky-9dec9d72768c6217a3878c80b11cbbd3d9ed0ff9.tar.zst
Only poll feed when feed page is focused (#2064)
* Do no poll when screen is not focused

* Avoid polling unless focused

* Handle homepage in background

* Fix the intl:check to ignore comments in diffs

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/view/com/feeds/FeedPage.tsx')
-rw-r--r--src/view/com/feeds/FeedPage.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx
index f06716fb0..f3f07a8bd 100644
--- a/src/view/com/feeds/FeedPage.tsx
+++ b/src/view/com/feeds/FeedPage.tsx
@@ -158,9 +158,9 @@ export function FeedPage({
     <View testID={testID} style={s.h100pct}>
       <Feed
         testID={testID ? `${testID}-feed` : undefined}
+        enabled={isPageFocused}
         feed={feed}
         feedParams={feedParams}
-        enabled={isPageFocused}
         pollInterval={POLL_FREQ}
         scrollElRef={scrollElRef}
         onScroll={onMainScroll}