Cleanup flags (#4891)

* Remove launched gates

* Remove disabled gates
zio/stable
dan 2024-08-08 15:25:42 +01:00 committed by GitHub
parent 1e3b2d6f42
commit f1031d100b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 27 deletions

View File

@ -5,7 +5,7 @@ import {BskyAgent} from '@atproto/api'
import {logger} from '#/logger' import {logger} from '#/logger'
import {SessionAccount, useAgent, useSession} from '#/state/session' 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 {devicePlatform, isAndroid, isNative} from 'platform/detection'
import BackgroundNotificationHandler from '../../../modules/expo-background-notification-handler' import BackgroundNotificationHandler from '../../../modules/expo-background-notification-handler'
@ -86,7 +86,6 @@ export function useNotificationsRegistration() {
} }
export function useRequestNotificationsPermission() { export function useRequestNotificationsPermission() {
const gate = useGate()
const {currentAccount} = useSession() const {currentAccount} = useSession()
const agent = useAgent() const agent = useAgent()
@ -102,16 +101,7 @@ export function useRequestNotificationsPermission() {
) { ) {
return return
} }
if ( if (context === 'AfterOnboarding') {
context === 'StartOnboarding' &&
gate('request_notifications_permission_after_onboarding_v2')
) {
return
}
if (
context === 'AfterOnboarding' &&
!gate('request_notifications_permission_after_onboarding_v2')
) {
return return
} }
if (context === 'Home' && !currentAccount) { if (context === 'Home' && !currentAccount) {

View File

@ -6,13 +6,10 @@ export type Gate =
| 'new_user_guided_tour' | 'new_user_guided_tour'
| 'new_user_progress_guide' | 'new_user_progress_guide'
| 'onboarding_minimum_interests' | 'onboarding_minimum_interests'
| 'request_notifications_permission_after_onboarding_v2'
| 'session_withproxy_fix' | 'session_withproxy_fix'
| 'show_avi_follow_button' | 'show_avi_follow_button'
| 'show_follow_back_label_v2' | 'show_follow_back_label_v2'
| 'suggested_feeds_interstitial' | 'suggested_feeds_interstitial'
| 'suggested_follows_interstitial'
| 'ungroup_follow_backs' | 'ungroup_follow_backs'
| 'video_debug' | 'video_debug'
| 'videos' | 'videos'
| 'small_avi_thumb'

View File

@ -349,8 +349,7 @@ let Feed = ({
const shouldShow = const shouldShow =
(interstitial.type === feedInterstitialType && (interstitial.type === feedInterstitialType &&
gate('suggested_feeds_interstitial')) || gate('suggested_feeds_interstitial')) ||
(interstitial.type === followInterstitialType && interstitial.type === followInterstitialType ||
gate('suggested_follows_interstitial')) ||
interstitial.type === progressGuideInterstitialType interstitial.type === progressGuideInterstitialType
if (shouldShow) { if (shouldShow) {

View File

@ -8,7 +8,6 @@ import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {useQueryClient} from '@tanstack/react-query' import {useQueryClient} from '@tanstack/react-query'
import {useGate} from '#/lib/statsig/statsig'
import {logger} from '#/logger' import {logger} from '#/logger'
import {usePalette} from 'lib/hooks/usePalette' import {usePalette} from 'lib/hooks/usePalette'
import { import {
@ -179,7 +178,6 @@ let UserAvatar = ({
const pal = usePalette('default') const pal = usePalette('default')
const backgroundColor = pal.colors.backgroundLight const backgroundColor = pal.colors.backgroundLight
const finalShape = overrideShape ?? (type === 'user' ? 'circle' : 'square') const finalShape = overrideShape ?? (type === 'user' ? 'circle' : 'square')
const gate = useGate()
const aviStyle = useMemo(() => { const aviStyle = useMemo(() => {
if (finalShape === 'square') { if (finalShape === 'square') {
@ -223,10 +221,7 @@ let UserAvatar = ({
style={aviStyle} style={aviStyle}
resizeMode="cover" resizeMode="cover"
source={{ source={{
uri: hackModifyThumbnailPath( uri: hackModifyThumbnailPath(avatar, size < 90),
avatar,
size < 90 && gate('small_avi_thumb'),
),
}} }}
blurRadius={moderation?.blur ? BLUR_AMOUNT : 0} blurRadius={moderation?.blur ? BLUR_AMOUNT : 0}
/> />
@ -236,10 +231,7 @@ let UserAvatar = ({
style={aviStyle} style={aviStyle}
contentFit="cover" contentFit="cover"
source={{ source={{
uri: hackModifyThumbnailPath( uri: hackModifyThumbnailPath(avatar, size < 90),
avatar,
size < 90 && gate('small_avi_thumb'),
),
}} }}
blurRadius={moderation?.blur ? BLUR_AMOUNT : 0} blurRadius={moderation?.blur ? BLUR_AMOUNT : 0}
/> />