about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/lib/constants.ts10
-rw-r--r--src/lib/statsig/gates.ts4
-rw-r--r--src/screens/Settings/AppIconSettings/index.tsx8
-rw-r--r--src/screens/Settings/AppearanceSettings.tsx9
-rw-r--r--src/state/queries/post-feed.ts5
-rw-r--r--src/view/com/util/post-ctrls/PostCtrls.tsx7
6 files changed, 14 insertions, 29 deletions
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index 5d7b5eb45..279c6f913 100644
--- a/src/lib/constants.ts
+++ b/src/lib/constants.ts
@@ -23,16 +23,6 @@ export const STARTER_PACK_MAX_SIZE = 150
 // -prf
 export const JOINED_THIS_WEEK = 2880000 // estimate as of 11/26/24
 
-export const DISCOVER_DEBUG_DIDS: Record<string, true> = {
-  'did:plc:oisofpd7lj26yvgiivf3lxsi': true, // hailey.at
-  'did:plc:fpruhuo22xkm5o7ttr2ktxdo': true, // danabra.mov
-  'did:plc:p2cp5gopk7mgjegy6wadk3ep': true, // samuel.bsky.team
-  'did:plc:ragtjsm2j2vknwkz3zp4oxrd': true, // pfrazee.com
-  'did:plc:vpkhqolt662uhesyj6nxm7ys': true, // why.bsky.team
-  'did:plc:3jpt2mvvsumj2r7eqk4gzzjz': true, // esb.lol
-  'did:plc:vjug55kidv6sye7ykr5faxxn': true, // emilyliu.me
-}
-
 const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new`
 export function FEEDBACK_FORM_URL({
   email,
diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts
index 3767ec1e5..6876f18c5 100644
--- a/src/lib/statsig/gates.ts
+++ b/src/lib/statsig/gates.ts
@@ -1,5 +1,3 @@
 export type Gate =
   // Keep this alphabetic please.
-  | 'debug_show_feedcontext' // DISABLED DUE TO EME
-  | 'post_feed_lang_window' // DISABLED DUE TO EME
-  | 'remove_show_latest_button'
+  'debug_show_feedcontext' | 'debug_subscriptions' | 'remove_show_latest_button'
diff --git a/src/screens/Settings/AppIconSettings/index.tsx b/src/screens/Settings/AppIconSettings/index.tsx
index 0fefca29b..0be2894d5 100644
--- a/src/screens/Settings/AppIconSettings/index.tsx
+++ b/src/screens/Settings/AppIconSettings/index.tsx
@@ -5,11 +5,11 @@ import {useLingui} from '@lingui/react'
 import * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon'
 import {NativeStackScreenProps} from '@react-navigation/native-stack'
 
-import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
+import {IS_INTERNAL} from '#/lib/app-info'
 import {PressableScale} from '#/lib/custom-animations/PressableScale'
 import {CommonNavigatorParams} from '#/lib/routes/types'
+import {useGate} from '#/lib/statsig/statsig'
 import {isAndroid} from '#/platform/detection'
-import {useSession} from '#/state/session'
 import {AppIconImage} from '#/screens/Settings/AppIconSettings/AppIconImage'
 import {AppIconSet} from '#/screens/Settings/AppIconSettings/types'
 import {useAppIconSets} from '#/screens/Settings/AppIconSettings/useAppIconSets'
@@ -23,7 +23,7 @@ export function AppIconSettingsScreen({}: Props) {
   const t = useTheme()
   const {_} = useLingui()
   const sets = useAppIconSets()
-  const {currentAccount} = useSession()
+  const gate = useGate()
   const [currentAppIcon, setCurrentAppIcon] = useState(() =>
     getAppIconName(DynamicAppIcon.getAppIcon()),
   )
@@ -86,7 +86,7 @@ export function AppIconSettingsScreen({}: Props) {
           ))}
         </Group>
 
-        {DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] && (
+        {IS_INTERNAL && gate('debug_subscriptions') && (
           <>
             <Text
               style={[
diff --git a/src/screens/Settings/AppearanceSettings.tsx b/src/screens/Settings/AppearanceSettings.tsx
index 81ac59105..4a8a61cd2 100644
--- a/src/screens/Settings/AppearanceSettings.tsx
+++ b/src/screens/Settings/AppearanceSettings.tsx
@@ -8,10 +8,10 @@ import Animated, {
 import {msg, Trans} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 
-import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
+import {IS_INTERNAL} from '#/lib/app-info'
 import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types'
+import {useGate} from '#/lib/statsig/statsig'
 import {isNative} from '#/platform/detection'
-import {useSession} from '#/state/session'
 import {useSetThemePrefs, useThemePrefs} from '#/state/shell'
 import {SettingsListItem as AppIconSettingsListItem} from '#/screens/Settings/AppIconSettings/SettingsListItem'
 import {atoms as a, native, useAlf, useTheme} from '#/alf'
@@ -29,6 +29,7 @@ type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppearanceSettings'>
 export function AppearanceSettingsScreen({}: Props) {
   const {_} = useLingui()
   const {fonts} = useAlf()
+  const gate = useGate()
 
   const {colorMode, darkTheme} = useThemePrefs()
   const {setColorMode, setDarkTheme} = useSetThemePrefs()
@@ -74,8 +75,6 @@ export function AppearanceSettingsScreen({}: Props) {
     [fonts],
   )
 
-  const {currentAccount} = useSession()
-
   return (
     <LayoutAnimationConfig skipExiting skipEntering>
       <Layout.Screen testID="preferencesThreadsScreen">
@@ -178,7 +177,7 @@ export function AppearanceSettingsScreen({}: Props) {
                 onChange={onChangeFontScale}
               />
 
-              {isNative && DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] && (
+              {isNative && IS_INTERNAL && gate('debug_subscriptions') && (
                 <>
                   <SettingsList.Divider />
                   <AppIconSettingsListItem />
diff --git a/src/state/queries/post-feed.ts b/src/state/queries/post-feed.ts
index 696e28f9c..2eb604627 100644
--- a/src/state/queries/post-feed.ts
+++ b/src/state/queries/post-feed.ts
@@ -144,11 +144,8 @@ export function usePostFeedQuery(
   /**
    * The number of posts to fetch in a single request. Because we filter
    * unwanted content, we may over-fetch here to try and fill pages by
-   * `MIN_POSTS`.
+   * `MIN_POSTS`. But if you're doing this, ask @why if it's ok first.
    */
-
-  // TEMPORARILY DISABLING GATE TO PREVENT EVENT CONSUMPTION @TODO EME-GATE
-  // const fetchLimit = gate('post_feed_lang_window') ? 100 : MIN_POSTS
   const fetchLimit = MIN_POSTS
 
   // Make sure this doesn't invalidate unless really needed.
diff --git a/src/view/com/util/post-ctrls/PostCtrls.tsx b/src/view/com/util/post-ctrls/PostCtrls.tsx
index 39caaf098..607a480ff 100644
--- a/src/view/com/util/post-ctrls/PostCtrls.tsx
+++ b/src/view/com/util/post-ctrls/PostCtrls.tsx
@@ -18,12 +18,13 @@ import {msg, plural} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 
 import {IS_INTERNAL} from '#/lib/app-info'
-import {DISCOVER_DEBUG_DIDS, POST_CTRL_HITSLOP} from '#/lib/constants'
+import {POST_CTRL_HITSLOP} from '#/lib/constants'
 import {CountWheel} from '#/lib/custom-animations/CountWheel'
 import {AnimatedLikeIcon} from '#/lib/custom-animations/LikeIcon'
 import {useHaptics} from '#/lib/haptics'
 import {makeProfileLink} from '#/lib/routes/links'
 import {shareUrl} from '#/lib/sharing'
+import {useGate} from '#/lib/statsig/statsig'
 import {toShareUrl} from '#/lib/strings/url-helpers'
 import {Shadow} from '#/state/cache/types'
 import {useFeedFeedbackContext} from '#/state/feed-feedback'
@@ -85,8 +86,8 @@ let PostCtrls = ({
   const {sendInteraction} = useFeedFeedbackContext()
   const {captureAction} = useProgressGuideControls()
   const playHaptic = useHaptics()
-  const isDiscoverDebugUser =
-    IS_INTERNAL || DISCOVER_DEBUG_DIDS[currentAccount?.did ?? '']
+  const gate = useGate()
+  const isDiscoverDebugUser = IS_INTERNAL || gate('debug_show_feedcontext')
   const isBlocked = Boolean(
     post.author.viewer?.blocking ||
       post.author.viewer?.blockedBy ||