Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Adjust gates (#7132)

* Remove dead gate

* Adjust gates

* No need to disable exposures

authored by

dan and committed by
GitHub
de97c07c c339dc5b

+14 -29
-10
src/lib/constants.ts
··· 23 23 // -prf 24 24 export const JOINED_THIS_WEEK = 2880000 // estimate as of 11/26/24 25 25 26 - export const DISCOVER_DEBUG_DIDS: Record<string, true> = { 27 - 'did:plc:oisofpd7lj26yvgiivf3lxsi': true, // hailey.at 28 - 'did:plc:fpruhuo22xkm5o7ttr2ktxdo': true, // danabra.mov 29 - 'did:plc:p2cp5gopk7mgjegy6wadk3ep': true, // samuel.bsky.team 30 - 'did:plc:ragtjsm2j2vknwkz3zp4oxrd': true, // pfrazee.com 31 - 'did:plc:vpkhqolt662uhesyj6nxm7ys': true, // why.bsky.team 32 - 'did:plc:3jpt2mvvsumj2r7eqk4gzzjz': true, // esb.lol 33 - 'did:plc:vjug55kidv6sye7ykr5faxxn': true, // emilyliu.me 34 - } 35 - 36 26 const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new` 37 27 export function FEEDBACK_FORM_URL({ 38 28 email,
+1 -3
src/lib/statsig/gates.ts
··· 1 1 export type Gate = 2 2 // Keep this alphabetic please. 3 - | 'debug_show_feedcontext' // DISABLED DUE TO EME 4 - | 'post_feed_lang_window' // DISABLED DUE TO EME 5 - | 'remove_show_latest_button' 3 + 'debug_show_feedcontext' | 'debug_subscriptions' | 'remove_show_latest_button'
+4 -4
src/screens/Settings/AppIconSettings/index.tsx
··· 5 5 import * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon' 6 6 import {NativeStackScreenProps} from '@react-navigation/native-stack' 7 7 8 - import {DISCOVER_DEBUG_DIDS} from '#/lib/constants' 8 + import {IS_INTERNAL} from '#/lib/app-info' 9 9 import {PressableScale} from '#/lib/custom-animations/PressableScale' 10 10 import {CommonNavigatorParams} from '#/lib/routes/types' 11 + import {useGate} from '#/lib/statsig/statsig' 11 12 import {isAndroid} from '#/platform/detection' 12 - import {useSession} from '#/state/session' 13 13 import {AppIconImage} from '#/screens/Settings/AppIconSettings/AppIconImage' 14 14 import {AppIconSet} from '#/screens/Settings/AppIconSettings/types' 15 15 import {useAppIconSets} from '#/screens/Settings/AppIconSettings/useAppIconSets' ··· 23 23 const t = useTheme() 24 24 const {_} = useLingui() 25 25 const sets = useAppIconSets() 26 - const {currentAccount} = useSession() 26 + const gate = useGate() 27 27 const [currentAppIcon, setCurrentAppIcon] = useState(() => 28 28 getAppIconName(DynamicAppIcon.getAppIcon()), 29 29 ) ··· 86 86 ))} 87 87 </Group> 88 88 89 - {DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] && ( 89 + {IS_INTERNAL && gate('debug_subscriptions') && ( 90 90 <> 91 91 <Text 92 92 style={[
+4 -5
src/screens/Settings/AppearanceSettings.tsx
··· 8 8 import {msg, Trans} from '@lingui/macro' 9 9 import {useLingui} from '@lingui/react' 10 10 11 - import {DISCOVER_DEBUG_DIDS} from '#/lib/constants' 11 + import {IS_INTERNAL} from '#/lib/app-info' 12 12 import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' 13 + import {useGate} from '#/lib/statsig/statsig' 13 14 import {isNative} from '#/platform/detection' 14 - import {useSession} from '#/state/session' 15 15 import {useSetThemePrefs, useThemePrefs} from '#/state/shell' 16 16 import {SettingsListItem as AppIconSettingsListItem} from '#/screens/Settings/AppIconSettings/SettingsListItem' 17 17 import {atoms as a, native, useAlf, useTheme} from '#/alf' ··· 29 29 export function AppearanceSettingsScreen({}: Props) { 30 30 const {_} = useLingui() 31 31 const {fonts} = useAlf() 32 + const gate = useGate() 32 33 33 34 const {colorMode, darkTheme} = useThemePrefs() 34 35 const {setColorMode, setDarkTheme} = useSetThemePrefs() ··· 73 74 }, 74 75 [fonts], 75 76 ) 76 - 77 - const {currentAccount} = useSession() 78 77 79 78 return ( 80 79 <LayoutAnimationConfig skipExiting skipEntering> ··· 178 177 onChange={onChangeFontScale} 179 178 /> 180 179 181 - {isNative && DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] && ( 180 + {isNative && IS_INTERNAL && gate('debug_subscriptions') && ( 182 181 <> 183 182 <SettingsList.Divider /> 184 183 <AppIconSettingsListItem />
+1 -4
src/state/queries/post-feed.ts
··· 144 144 /** 145 145 * The number of posts to fetch in a single request. Because we filter 146 146 * unwanted content, we may over-fetch here to try and fill pages by 147 - * `MIN_POSTS`. 147 + * `MIN_POSTS`. But if you're doing this, ask @why if it's ok first. 148 148 */ 149 - 150 - // TEMPORARILY DISABLING GATE TO PREVENT EVENT CONSUMPTION @TODO EME-GATE 151 - // const fetchLimit = gate('post_feed_lang_window') ? 100 : MIN_POSTS 152 149 const fetchLimit = MIN_POSTS 153 150 154 151 // Make sure this doesn't invalidate unless really needed.
+4 -3
src/view/com/util/post-ctrls/PostCtrls.tsx
··· 18 18 import {useLingui} from '@lingui/react' 19 19 20 20 import {IS_INTERNAL} from '#/lib/app-info' 21 - import {DISCOVER_DEBUG_DIDS, POST_CTRL_HITSLOP} from '#/lib/constants' 21 + import {POST_CTRL_HITSLOP} from '#/lib/constants' 22 22 import {CountWheel} from '#/lib/custom-animations/CountWheel' 23 23 import {AnimatedLikeIcon} from '#/lib/custom-animations/LikeIcon' 24 24 import {useHaptics} from '#/lib/haptics' 25 25 import {makeProfileLink} from '#/lib/routes/links' 26 26 import {shareUrl} from '#/lib/sharing' 27 + import {useGate} from '#/lib/statsig/statsig' 27 28 import {toShareUrl} from '#/lib/strings/url-helpers' 28 29 import {Shadow} from '#/state/cache/types' 29 30 import {useFeedFeedbackContext} from '#/state/feed-feedback' ··· 85 86 const {sendInteraction} = useFeedFeedbackContext() 86 87 const {captureAction} = useProgressGuideControls() 87 88 const playHaptic = useHaptics() 88 - const isDiscoverDebugUser = 89 - IS_INTERNAL || DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] 89 + const gate = useGate() 90 + const isDiscoverDebugUser = IS_INTERNAL || gate('debug_show_feedcontext') 90 91 const isBlocked = Boolean( 91 92 post.author.viewer?.blocking || 92 93 post.author.viewer?.blockedBy ||