Adjust gates (#7132)
* Remove dead gate * Adjust gates * No need to disable exposures
This commit is contained in:
@@ -23,16 +23,6 @@ export const STARTER_PACK_MAX_SIZE = 150
|
|||||||
// -prf
|
// -prf
|
||||||
export const JOINED_THIS_WEEK = 2880000 // estimate as of 11/26/24
|
export const JOINED_THIS_WEEK = 2880000 // estimate as of 11/26/24
|
||||||
|
|
||||||
export const DISCOVER_DEBUG_DIDS: Record<string, true> = {
|
|
||||||
'did:plc:oisofpd7lj26yvgiivf3lxsi': true, // hailey.at
|
|
||||||
'did:plc:fpruhuo22xkm5o7ttr2ktxdo': true, // danabra.mov
|
|
||||||
'did:plc:p2cp5gopk7mgjegy6wadk3ep': true, // samuel.bsky.team
|
|
||||||
'did:plc:ragtjsm2j2vknwkz3zp4oxrd': true, // pfrazee.com
|
|
||||||
'did:plc:vpkhqolt662uhesyj6nxm7ys': true, // why.bsky.team
|
|
||||||
'did:plc:3jpt2mvvsumj2r7eqk4gzzjz': true, // esb.lol
|
|
||||||
'did:plc:vjug55kidv6sye7ykr5faxxn': true, // emilyliu.me
|
|
||||||
}
|
|
||||||
|
|
||||||
const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new`
|
const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new`
|
||||||
export function FEEDBACK_FORM_URL({
|
export function FEEDBACK_FORM_URL({
|
||||||
email,
|
email,
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
export type Gate =
|
export type Gate =
|
||||||
// Keep this alphabetic please.
|
// Keep this alphabetic please.
|
||||||
| 'debug_show_feedcontext' // DISABLED DUE TO EME
|
'debug_show_feedcontext' | 'debug_subscriptions' | 'remove_show_latest_button'
|
||||||
| 'post_feed_lang_window' // DISABLED DUE TO EME
|
|
||||||
| 'remove_show_latest_button'
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import {useLingui} from '@lingui/react'
|
|||||||
import * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon'
|
import * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon'
|
||||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
|
|
||||||
import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
|
import {IS_INTERNAL} from '#/lib/app-info'
|
||||||
import {PressableScale} from '#/lib/custom-animations/PressableScale'
|
import {PressableScale} from '#/lib/custom-animations/PressableScale'
|
||||||
import {CommonNavigatorParams} from '#/lib/routes/types'
|
import {CommonNavigatorParams} from '#/lib/routes/types'
|
||||||
|
import {useGate} from '#/lib/statsig/statsig'
|
||||||
import {isAndroid} from '#/platform/detection'
|
import {isAndroid} from '#/platform/detection'
|
||||||
import {useSession} from '#/state/session'
|
|
||||||
import {AppIconImage} from '#/screens/Settings/AppIconSettings/AppIconImage'
|
import {AppIconImage} from '#/screens/Settings/AppIconSettings/AppIconImage'
|
||||||
import {AppIconSet} from '#/screens/Settings/AppIconSettings/types'
|
import {AppIconSet} from '#/screens/Settings/AppIconSettings/types'
|
||||||
import {useAppIconSets} from '#/screens/Settings/AppIconSettings/useAppIconSets'
|
import {useAppIconSets} from '#/screens/Settings/AppIconSettings/useAppIconSets'
|
||||||
@@ -23,7 +23,7 @@ export function AppIconSettingsScreen({}: Props) {
|
|||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const sets = useAppIconSets()
|
const sets = useAppIconSets()
|
||||||
const {currentAccount} = useSession()
|
const gate = useGate()
|
||||||
const [currentAppIcon, setCurrentAppIcon] = useState(() =>
|
const [currentAppIcon, setCurrentAppIcon] = useState(() =>
|
||||||
getAppIconName(DynamicAppIcon.getAppIcon()),
|
getAppIconName(DynamicAppIcon.getAppIcon()),
|
||||||
)
|
)
|
||||||
@@ -86,7 +86,7 @@ export function AppIconSettingsScreen({}: Props) {
|
|||||||
))}
|
))}
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
{DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] && (
|
{IS_INTERNAL && gate('debug_subscriptions') && (
|
||||||
<>
|
<>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import Animated, {
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
|
import {IS_INTERNAL} from '#/lib/app-info'
|
||||||
import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types'
|
import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types'
|
||||||
|
import {useGate} from '#/lib/statsig/statsig'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {useSession} from '#/state/session'
|
|
||||||
import {useSetThemePrefs, useThemePrefs} from '#/state/shell'
|
import {useSetThemePrefs, useThemePrefs} from '#/state/shell'
|
||||||
import {SettingsListItem as AppIconSettingsListItem} from '#/screens/Settings/AppIconSettings/SettingsListItem'
|
import {SettingsListItem as AppIconSettingsListItem} from '#/screens/Settings/AppIconSettings/SettingsListItem'
|
||||||
import {atoms as a, native, useAlf, useTheme} from '#/alf'
|
import {atoms as a, native, useAlf, useTheme} from '#/alf'
|
||||||
@@ -29,6 +29,7 @@ type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppearanceSettings'>
|
|||||||
export function AppearanceSettingsScreen({}: Props) {
|
export function AppearanceSettingsScreen({}: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const {fonts} = useAlf()
|
const {fonts} = useAlf()
|
||||||
|
const gate = useGate()
|
||||||
|
|
||||||
const {colorMode, darkTheme} = useThemePrefs()
|
const {colorMode, darkTheme} = useThemePrefs()
|
||||||
const {setColorMode, setDarkTheme} = useSetThemePrefs()
|
const {setColorMode, setDarkTheme} = useSetThemePrefs()
|
||||||
@@ -74,8 +75,6 @@ export function AppearanceSettingsScreen({}: Props) {
|
|||||||
[fonts],
|
[fonts],
|
||||||
)
|
)
|
||||||
|
|
||||||
const {currentAccount} = useSession()
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LayoutAnimationConfig skipExiting skipEntering>
|
<LayoutAnimationConfig skipExiting skipEntering>
|
||||||
<Layout.Screen testID="preferencesThreadsScreen">
|
<Layout.Screen testID="preferencesThreadsScreen">
|
||||||
@@ -178,7 +177,7 @@ export function AppearanceSettingsScreen({}: Props) {
|
|||||||
onChange={onChangeFontScale}
|
onChange={onChangeFontScale}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{isNative && DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] && (
|
{isNative && IS_INTERNAL && gate('debug_subscriptions') && (
|
||||||
<>
|
<>
|
||||||
<SettingsList.Divider />
|
<SettingsList.Divider />
|
||||||
<AppIconSettingsListItem />
|
<AppIconSettingsListItem />
|
||||||
|
|||||||
@@ -144,11 +144,8 @@ export function usePostFeedQuery(
|
|||||||
/**
|
/**
|
||||||
* The number of posts to fetch in a single request. Because we filter
|
* The number of posts to fetch in a single request. Because we filter
|
||||||
* unwanted content, we may over-fetch here to try and fill pages by
|
* unwanted content, we may over-fetch here to try and fill pages by
|
||||||
* `MIN_POSTS`.
|
* `MIN_POSTS`. But if you're doing this, ask @why if it's ok first.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TEMPORARILY DISABLING GATE TO PREVENT EVENT CONSUMPTION @TODO EME-GATE
|
|
||||||
// const fetchLimit = gate('post_feed_lang_window') ? 100 : MIN_POSTS
|
|
||||||
const fetchLimit = MIN_POSTS
|
const fetchLimit = MIN_POSTS
|
||||||
|
|
||||||
// Make sure this doesn't invalidate unless really needed.
|
// Make sure this doesn't invalidate unless really needed.
|
||||||
|
|||||||
@@ -18,12 +18,13 @@ import {msg, plural} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {IS_INTERNAL} from '#/lib/app-info'
|
import {IS_INTERNAL} from '#/lib/app-info'
|
||||||
import {DISCOVER_DEBUG_DIDS, 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,8 +86,8 @@ let PostCtrls = ({
|
|||||||
const {sendInteraction} = useFeedFeedbackContext()
|
const {sendInteraction} = useFeedFeedbackContext()
|
||||||
const {captureAction} = useProgressGuideControls()
|
const {captureAction} = useProgressGuideControls()
|
||||||
const playHaptic = useHaptics()
|
const playHaptic = useHaptics()
|
||||||
const isDiscoverDebugUser =
|
const gate = useGate()
|
||||||
IS_INTERNAL || DISCOVER_DEBUG_DIDS[currentAccount?.did ?? '']
|
const isDiscoverDebugUser = IS_INTERNAL || gate('debug_show_feedcontext')
|
||||||
const isBlocked = Boolean(
|
const isBlocked = Boolean(
|
||||||
post.author.viewer?.blocking ||
|
post.author.viewer?.blocking ||
|
||||||
post.author.viewer?.blockedBy ||
|
post.author.viewer?.blockedBy ||
|
||||||
|
|||||||
Reference in New Issue
Block a user