diff options
author | dan <dan.abramov@gmail.com> | 2024-08-08 15:25:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-08 15:25:42 +0100 |
commit | f1031d100b583fa289e654c5dfba6d251ea85272 (patch) | |
tree | f225590178c006b01399950a91a1741766c55f92 | |
parent | 1e3b2d6f42839501ce47f88a19ffd477f1e2f82d (diff) | |
download | voidsky-f1031d100b583fa289e654c5dfba6d251ea85272.tar.zst |
Cleanup flags (#4891)
* Remove launched gates * Remove disabled gates
-rw-r--r-- | src/lib/notifications/notifications.ts | 14 | ||||
-rw-r--r-- | src/lib/statsig/gates.ts | 3 | ||||
-rw-r--r-- | src/view/com/posts/Feed.tsx | 3 | ||||
-rw-r--r-- | src/view/com/util/UserAvatar.tsx | 12 |
4 files changed, 5 insertions, 27 deletions
diff --git a/src/lib/notifications/notifications.ts b/src/lib/notifications/notifications.ts index fafc66143..88b9eee3a 100644 --- a/src/lib/notifications/notifications.ts +++ b/src/lib/notifications/notifications.ts @@ -5,7 +5,7 @@ import {BskyAgent} from '@atproto/api' import {logger} from '#/logger' import {SessionAccount, useAgent, useSession} from '#/state/session' -import {logEvent, useGate} from 'lib/statsig/statsig' +import {logEvent} from 'lib/statsig/statsig' import {devicePlatform, isAndroid, isNative} from 'platform/detection' import BackgroundNotificationHandler from '../../../modules/expo-background-notification-handler' @@ -86,7 +86,6 @@ export function useNotificationsRegistration() { } export function useRequestNotificationsPermission() { - const gate = useGate() const {currentAccount} = useSession() const agent = useAgent() @@ -102,16 +101,7 @@ export function useRequestNotificationsPermission() { ) { return } - if ( - context === 'StartOnboarding' && - gate('request_notifications_permission_after_onboarding_v2') - ) { - return - } - if ( - context === 'AfterOnboarding' && - !gate('request_notifications_permission_after_onboarding_v2') - ) { + if (context === 'AfterOnboarding') { return } if (context === 'Home' && !currentAccount) { diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts index 4b482b47d..aa65e42a0 100644 --- a/src/lib/statsig/gates.ts +++ b/src/lib/statsig/gates.ts @@ -6,13 +6,10 @@ export type Gate = | 'new_user_guided_tour' | 'new_user_progress_guide' | 'onboarding_minimum_interests' - | 'request_notifications_permission_after_onboarding_v2' | 'session_withproxy_fix' | 'show_avi_follow_button' | 'show_follow_back_label_v2' | 'suggested_feeds_interstitial' - | 'suggested_follows_interstitial' | 'ungroup_follow_backs' | 'video_debug' | 'videos' - | 'small_avi_thumb' diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx index ef4633319..54ea9b140 100644 --- a/src/view/com/posts/Feed.tsx +++ b/src/view/com/posts/Feed.tsx @@ -349,8 +349,7 @@ let Feed = ({ const shouldShow = (interstitial.type === feedInterstitialType && gate('suggested_feeds_interstitial')) || - (interstitial.type === followInterstitialType && - gate('suggested_follows_interstitial')) || + interstitial.type === followInterstitialType || interstitial.type === progressGuideInterstitialType if (shouldShow) { diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index 8862bd0e4..66c9708bf 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -8,7 +8,6 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useQueryClient} from '@tanstack/react-query' -import {useGate} from '#/lib/statsig/statsig' import {logger} from '#/logger' import {usePalette} from 'lib/hooks/usePalette' import { @@ -179,7 +178,6 @@ let UserAvatar = ({ const pal = usePalette('default') const backgroundColor = pal.colors.backgroundLight const finalShape = overrideShape ?? (type === 'user' ? 'circle' : 'square') - const gate = useGate() const aviStyle = useMemo(() => { if (finalShape === 'square') { @@ -223,10 +221,7 @@ let UserAvatar = ({ style={aviStyle} resizeMode="cover" source={{ - uri: hackModifyThumbnailPath( - avatar, - size < 90 && gate('small_avi_thumb'), - ), + uri: hackModifyThumbnailPath(avatar, size < 90), }} blurRadius={moderation?.blur ? BLUR_AMOUNT : 0} /> @@ -236,10 +231,7 @@ let UserAvatar = ({ style={aviStyle} contentFit="cover" source={{ - uri: hackModifyThumbnailPath( - avatar, - size < 90 && gate('small_avi_thumb'), - ), + uri: hackModifyThumbnailPath(avatar, size < 90), }} blurRadius={moderation?.blur ? BLUR_AMOUNT : 0} /> |