diff options
-rw-r--r-- | src/lib/statsig/gates.ts | 1 | ||||
-rw-r--r-- | src/screens/Settings/NotificationSettings/components/PreferenceControls.tsx | 5 | ||||
-rw-r--r-- | src/screens/Settings/Settings.tsx | 20 |
3 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts index 3b1106480..fca3f609a 100644 --- a/src/lib/statsig/gates.ts +++ b/src/lib/statsig/gates.ts @@ -7,6 +7,7 @@ export type Gate = | 'old_postonboarding' | 'onboarding_add_video_feed' | 'post_threads_v2_unspecced' + | 'reengagement_features' | 'remove_show_latest_button' | 'test_gate_1' | 'test_gate_2' diff --git a/src/screens/Settings/NotificationSettings/components/PreferenceControls.tsx b/src/screens/Settings/NotificationSettings/components/PreferenceControls.tsx index 8d80e4ed3..487827d66 100644 --- a/src/screens/Settings/NotificationSettings/components/PreferenceControls.tsx +++ b/src/screens/Settings/NotificationSettings/components/PreferenceControls.tsx @@ -5,6 +5,7 @@ import {type FilterablePreference} from '@atproto/api/dist/client/types/app/bsky import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import {useGate} from '#/lib/statsig/statsig' import {useNotificationSettingsUpdateMutation} from '#/state/queries/notifications/settings' import {atoms as a, platform, useTheme} from '#/alf' import * as Toggle from '#/components/forms/Toggle' @@ -27,6 +28,10 @@ export function PreferenceControls({ preference?: AppBskyNotificationDefs.Preference | FilterablePreference allowDisableInApp?: boolean }) { + const gate = useGate() + + if (!gate('reengagement_features')) return null + if (!preference) return ( <View style={[a.w_full, a.pt_5xl, a.align_center]}> diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx index 6310c7c3c..e1d197070 100644 --- a/src/screens/Settings/Settings.tsx +++ b/src/screens/Settings/Settings.tsx @@ -16,6 +16,7 @@ import { type CommonNavigatorParams, type NavigationProp, } from '#/lib/routes/types' +import {useGate} from '#/lib/statsig/statsig' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {sanitizeHandle} from '#/lib/strings/handles' import {useProfileShadow} from '#/state/cache/profile-shadow' @@ -81,6 +82,7 @@ export function SettingsScreen({}: Props) { const {pendingDid, onPressSwitchAccount} = useAccountSwitcher() const [showAccounts, setShowAccounts] = useState(false) const [showDevOptions, setShowDevOptions] = useState(false) + const gate = useGate() return ( <Layout.Screen> @@ -181,14 +183,16 @@ export function SettingsScreen({}: Props) { <Trans>Moderation</Trans> </SettingsList.ItemText> </SettingsList.LinkItem> - <SettingsList.LinkItem - to="/settings/notifications" - label={_(msg`Notifications`)}> - <SettingsList.ItemIcon icon={NotificationIcon} /> - <SettingsList.ItemText> - <Trans>Notifications</Trans> - </SettingsList.ItemText> - </SettingsList.LinkItem> + {gate('reengagement_features') && ( + <SettingsList.LinkItem + to="/settings/notifications" + label={_(msg`Notifications`)}> + <SettingsList.ItemIcon icon={NotificationIcon} /> + <SettingsList.ItemText> + <Trans>Notifications</Trans> + </SettingsList.ItemText> + </SettingsList.LinkItem> + )} <SettingsList.LinkItem to="/settings/content-and-media" label={_(msg`Content and media`)}> |