Disable feed debug gate due to EME (#5815)
(cherry picked from commit e9be8f4574)
This commit is contained in:
@@ -3,6 +3,7 @@ import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
|
|||||||
export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV
|
export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV
|
||||||
export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
|
export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
|
||||||
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
||||||
|
export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT
|
||||||
|
|
||||||
// This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings
|
// This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings
|
||||||
// along with the other version info. Useful for debugging/reporting.
|
// along with the other version info. Useful for debugging/reporting.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export type Gate =
|
export type Gate =
|
||||||
// Keep this alphabetic please.
|
// Keep this alphabetic please.
|
||||||
| 'debug_show_feedcontext'
|
| 'debug_show_feedcontext' // DISABLED DUE TO EME
|
||||||
| 'post_feed_lang_window'
|
| 'post_feed_lang_window' // DISABLED DUE TO EME
|
||||||
| 'suggested_feeds_interstitial'
|
| 'suggested_feeds_interstitial'
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {AtpSessionData, AtpSessionEvent} from '@atproto/api'
|
|||||||
import {sha256} from 'js-sha256'
|
import {sha256} from 'js-sha256'
|
||||||
import {Statsig} from 'statsig-react-native-expo'
|
import {Statsig} from 'statsig-react-native-expo'
|
||||||
|
|
||||||
|
import {IS_INTERNAL} from '#/lib/app-info'
|
||||||
import {Schema} from '../persisted'
|
import {Schema} from '../persisted'
|
||||||
import {Action, State} from './reducer'
|
import {Action, State} from './reducer'
|
||||||
import {SessionAccount} from './types'
|
import {SessionAccount} from './types'
|
||||||
@@ -93,9 +94,13 @@ export function addSessionDebugLog(log: Log) {
|
|||||||
// Drop these logs for now.
|
// Drop these logs for now.
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!Statsig.checkGate('debug_session')) {
|
// DISABLING THIS GATE DUE TO EME @TODO EME-GATE
|
||||||
|
if (!IS_INTERNAL) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// if (!Statsig.checkGate('debug_session')) {
|
||||||
|
// return
|
||||||
|
// }
|
||||||
const messageIndex = nextMessageIndex++
|
const messageIndex = nextMessageIndex++
|
||||||
const {type, ...content} = log
|
const {type, ...content} = log
|
||||||
let payload = JSON.stringify(content, replacer)
|
let payload = JSON.stringify(content, replacer)
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ import {
|
|||||||
import {msg, plural} from '@lingui/macro'
|
import {msg, plural} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {IS_INTERNAL} from '#/lib/app-info'
|
||||||
import {POST_CTRL_HITSLOP} from '#/lib/constants'
|
import {POST_CTRL_HITSLOP} from '#/lib/constants'
|
||||||
import {CountWheel} from '#/lib/custom-animations/CountWheel'
|
import {CountWheel} from '#/lib/custom-animations/CountWheel'
|
||||||
import {AnimatedLikeIcon} from '#/lib/custom-animations/LikeIcon'
|
import {AnimatedLikeIcon} from '#/lib/custom-animations/LikeIcon'
|
||||||
import {useHaptics} from '#/lib/haptics'
|
import {useHaptics} from '#/lib/haptics'
|
||||||
import {makeProfileLink} from '#/lib/routes/links'
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {shareUrl} from '#/lib/sharing'
|
import {shareUrl} from '#/lib/sharing'
|
||||||
import {useGate} from '#/lib/statsig/statsig'
|
|
||||||
import {toShareUrl} from '#/lib/strings/url-helpers'
|
import {toShareUrl} from '#/lib/strings/url-helpers'
|
||||||
import {Shadow} from '#/state/cache/types'
|
import {Shadow} from '#/state/cache/types'
|
||||||
import {useFeedFeedbackContext} from '#/state/feed-feedback'
|
import {useFeedFeedbackContext} from '#/state/feed-feedback'
|
||||||
@@ -85,7 +85,6 @@ let PostCtrls = ({
|
|||||||
const {sendInteraction} = useFeedFeedbackContext()
|
const {sendInteraction} = useFeedFeedbackContext()
|
||||||
const {captureAction} = useProgressGuideControls()
|
const {captureAction} = useProgressGuideControls()
|
||||||
const playHaptic = useHaptics()
|
const playHaptic = useHaptics()
|
||||||
const gate = useGate()
|
|
||||||
const isBlocked = Boolean(
|
const isBlocked = Boolean(
|
||||||
post.author.viewer?.blocking ||
|
post.author.viewer?.blocking ||
|
||||||
post.author.viewer?.blockedBy ||
|
post.author.viewer?.blockedBy ||
|
||||||
@@ -375,7 +374,7 @@ let PostCtrls = ({
|
|||||||
threadgateRecord={threadgateRecord}
|
threadgateRecord={threadgateRecord}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
{gate('debug_show_feedcontext') && feedContext && (
|
{IS_INTERNAL && feedContext && (
|
||||||
<Pressable
|
<Pressable
|
||||||
accessible={false}
|
accessible={false}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user