about summary refs log tree commit diff
path: root/src/view/com
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-04-19 15:23:47 +0100
committerGitHub <noreply@github.com>2024-04-19 15:23:47 +0100
commit55aea348c263f345fc4a1e7209cf3c882b94cd32 (patch)
tree5b8034308cc98a061c47fbf9d01d09e4573938a4 /src/view/com
parentf709fbcbddde49a812197d79758482b6497be8d2 (diff)
downloadvoidsky-55aea348c263f345fc4a1e7209cf3c882b94cd32.tar.zst
[Statsig] Update experiments (#3617)
Diffstat (limited to 'src/view/com')
-rw-r--r--src/view/com/feeds/FeedPage.tsx22
-rw-r--r--src/view/com/post-thread/PostThreadFollowBtn.tsx2
2 files changed, 9 insertions, 15 deletions
diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx
index 2b8fde632..4ebf64da9 100644
--- a/src/view/com/feeds/FeedPage.tsx
+++ b/src/view/com/feeds/FeedPage.tsx
@@ -104,17 +104,11 @@ export function FeedPage({
     })
   }, [scrollToTop, feed, queryClient, setHasNew])
 
-  let feedPollInterval
-  if (
-    feed === // Discover
-      'feedgen|at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot' &&
-    // TODO: This gate check is still too early. Move it to where the polling happens.
-    gate('disable_poll_on_discover')
-  ) {
-    feedPollInterval = undefined
-  } else {
-    feedPollInterval = POLL_FREQ
-  }
+  const isDiscoverFeed =
+    feed ===
+    'feedgen|at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot'
+  const adjustedHasNew =
+    hasNew && !(isDiscoverFeed && gate('disable_poll_on_discover_v2'))
 
   return (
     <View testID={testID} style={s.h100pct}>
@@ -124,7 +118,7 @@ export function FeedPage({
           enabled={isPageFocused}
           feed={feed}
           feedParams={feedParams}
-          pollInterval={feedPollInterval}
+          pollInterval={POLL_FREQ}
           disablePoll={hasNew}
           scrollElRef={scrollElRef}
           onScrolledDownChange={setIsScrolledDown}
@@ -134,11 +128,11 @@ export function FeedPage({
           headerOffset={headerOffset}
         />
       </MainScrollProvider>
-      {(isScrolledDown || hasNew) && (
+      {(isScrolledDown || adjustedHasNew) && (
         <LoadLatestBtn
           onPress={onPressLoadLatest}
           label={_(msg`Load new posts`)}
-          showIndicator={hasNew}
+          showIndicator={adjustedHasNew}
         />
       )}
 
diff --git a/src/view/com/post-thread/PostThreadFollowBtn.tsx b/src/view/com/post-thread/PostThreadFollowBtn.tsx
index 7c9a54451..1f70f41c4 100644
--- a/src/view/com/post-thread/PostThreadFollowBtn.tsx
+++ b/src/view/com/post-thread/PostThreadFollowBtn.tsx
@@ -140,7 +140,7 @@ function PostThreadFollowBtnLoaded({
             style={[!isFollowing ? palInverted.text : pal.text, s.bold]}
             numberOfLines={1}>
             {!isFollowing ? (
-              isFollowedBy && gate('show_follow_back_label') ? (
+              isFollowedBy && gate('show_follow_back_label_v2') ? (
                 <Trans>Follow Back</Trans>
               ) : (
                 <Trans>Follow</Trans>