my fork of the bluesky client

Disable feed debug gate due to EME (#5815)

authored by hailey.at and committed by

GitHub e9be8f45 0d5af050

+11 -6
+1
src/lib/app-info.ts
··· 3 3 export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV 4 4 export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' 5 5 export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' 6 + export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT 6 7 7 8 // This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings 8 9 // along with the other version info. Useful for debugging/reporting.
+2 -2
src/lib/statsig/gates.ts
··· 1 1 export type Gate = 2 2 // Keep this alphabetic please. 3 - | 'debug_show_feedcontext' 4 - | 'post_feed_lang_window' 3 + | 'debug_show_feedcontext' // DISABLED DUE TO EME 4 + | 'post_feed_lang_window' // DISABLED DUE TO EME 5 5 | 'suggested_feeds_interstitial'
+6 -1
src/state/session/logging.ts
··· 2 2 import {sha256} from 'js-sha256' 3 3 import {Statsig} from 'statsig-react-native-expo' 4 4 5 + import {IS_INTERNAL} from '#/lib/app-info' 5 6 import {Schema} from '../persisted' 6 7 import {Action, State} from './reducer' 7 8 import {SessionAccount} from './types' ··· 93 94 // Drop these logs for now. 94 95 return 95 96 } 96 - if (!Statsig.checkGate('debug_session')) { 97 + // DISABLING THIS GATE DUE TO EME @TODO EME-GATE 98 + if (!IS_INTERNAL) { 97 99 return 98 100 } 101 + // if (!Statsig.checkGate('debug_session')) { 102 + // return 103 + // } 99 104 const messageIndex = nextMessageIndex++ 100 105 const {type, ...content} = log 101 106 let payload = JSON.stringify(content, replacer)
+2 -3
src/view/com/util/post-ctrls/PostCtrls.tsx
··· 17 17 import {msg, plural} from '@lingui/macro' 18 18 import {useLingui} from '@lingui/react' 19 19 20 + import {IS_INTERNAL} from '#/lib/app-info' 20 21 import {POST_CTRL_HITSLOP} from '#/lib/constants' 21 22 import {CountWheel} from '#/lib/custom-animations/CountWheel' 22 23 import {AnimatedLikeIcon} from '#/lib/custom-animations/LikeIcon' 23 24 import {useHaptics} from '#/lib/haptics' 24 25 import {makeProfileLink} from '#/lib/routes/links' 25 26 import {shareUrl} from '#/lib/sharing' 26 - import {useGate} from '#/lib/statsig/statsig' 27 27 import {toShareUrl} from '#/lib/strings/url-helpers' 28 28 import {Shadow} from '#/state/cache/types' 29 29 import {useFeedFeedbackContext} from '#/state/feed-feedback' ··· 85 85 const {sendInteraction} = useFeedFeedbackContext() 86 86 const {captureAction} = useProgressGuideControls() 87 87 const playHaptic = useHaptics() 88 - const gate = useGate() 89 88 const isBlocked = Boolean( 90 89 post.author.viewer?.blocking || 91 90 post.author.viewer?.blockedBy || ··· 375 374 threadgateRecord={threadgateRecord} 376 375 /> 377 376 </View> 378 - {gate('debug_show_feedcontext') && feedContext && ( 377 + {IS_INTERNAL && feedContext && ( 379 378 <Pressable 380 379 accessible={false} 381 380 style={{