mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

gate notification settings (#8527)

authored by samuel.fm and committed by

GitHub 42510c05 f36776a9

+18 -8
+1
src/lib/statsig/gates.ts
··· 7 7 | 'old_postonboarding' 8 8 | 'onboarding_add_video_feed' 9 9 | 'post_threads_v2_unspecced' 10 + | 'reengagement_features' 10 11 | 'remove_show_latest_button' 11 12 | 'test_gate_1' 12 13 | 'test_gate_2'
+5
src/screens/Settings/NotificationSettings/components/PreferenceControls.tsx
··· 5 5 import {msg, Trans} from '@lingui/macro' 6 6 import {useLingui} from '@lingui/react' 7 7 8 + import {useGate} from '#/lib/statsig/statsig' 8 9 import {useNotificationSettingsUpdateMutation} from '#/state/queries/notifications/settings' 9 10 import {atoms as a, platform, useTheme} from '#/alf' 10 11 import * as Toggle from '#/components/forms/Toggle' ··· 27 28 preference?: AppBskyNotificationDefs.Preference | FilterablePreference 28 29 allowDisableInApp?: boolean 29 30 }) { 31 + const gate = useGate() 32 + 33 + if (!gate('reengagement_features')) return null 34 + 30 35 if (!preference) 31 36 return ( 32 37 <View style={[a.w_full, a.pt_5xl, a.align_center]}>
+12 -8
src/screens/Settings/Settings.tsx
··· 16 16 type CommonNavigatorParams, 17 17 type NavigationProp, 18 18 } from '#/lib/routes/types' 19 + import {useGate} from '#/lib/statsig/statsig' 19 20 import {sanitizeDisplayName} from '#/lib/strings/display-names' 20 21 import {sanitizeHandle} from '#/lib/strings/handles' 21 22 import {useProfileShadow} from '#/state/cache/profile-shadow' ··· 81 82 const {pendingDid, onPressSwitchAccount} = useAccountSwitcher() 82 83 const [showAccounts, setShowAccounts] = useState(false) 83 84 const [showDevOptions, setShowDevOptions] = useState(false) 85 + const gate = useGate() 84 86 85 87 return ( 86 88 <Layout.Screen> ··· 181 183 <Trans>Moderation</Trans> 182 184 </SettingsList.ItemText> 183 185 </SettingsList.LinkItem> 184 - <SettingsList.LinkItem 185 - to="/settings/notifications" 186 - label={_(msg`Notifications`)}> 187 - <SettingsList.ItemIcon icon={NotificationIcon} /> 188 - <SettingsList.ItemText> 189 - <Trans>Notifications</Trans> 190 - </SettingsList.ItemText> 191 - </SettingsList.LinkItem> 186 + {gate('reengagement_features') && ( 187 + <SettingsList.LinkItem 188 + to="/settings/notifications" 189 + label={_(msg`Notifications`)}> 190 + <SettingsList.ItemIcon icon={NotificationIcon} /> 191 + <SettingsList.ItemText> 192 + <Trans>Notifications</Trans> 193 + </SettingsList.ItemText> 194 + </SettingsList.LinkItem> 195 + )} 192 196 <SettingsList.LinkItem 193 197 to="/settings/content-and-media" 194 198 label={_(msg`Content and media`)}>