Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Cleanup gates (#4170)

* Unlaunch disable_poll_on_discover_v2

* Rm unused gates

* Unlaunch autoexpand_suggestions_on_profile_follow_v2

* Launch disable_min_shell_on_foregrounding_v3

authored by

dan and committed by
GitHub
e6e7027d 3ca41e4e

+9 -30
-6
src/lib/statsig/gates.ts
··· 1 1 export type Gate = 2 2 // Keep this alphabetic please. 3 - | 'autoexpand_suggestions_on_profile_follow_v2' 4 - | 'disable_min_shell_on_foregrounding_v3' 5 - | 'disable_poll_on_discover_v2' 6 3 | 'reduced_onboarding_and_home_algo_v2' 7 4 | 'request_notifications_permission_after_onboarding' 8 5 | 'show_follow_back_label_v2' 9 - | 'start_session_with_following_v2' 10 - | 'test_gate_1' 11 - | 'test_gate_2'
+1 -6
src/screens/Profile/Header/ProfileHeaderStandard.tsx
··· 10 10 import {msg, Trans} from '@lingui/macro' 11 11 import {useLingui} from '@lingui/react' 12 12 13 - import {useGate} from '#/lib/statsig/statsig' 14 13 import {logger} from '#/logger' 15 - import {isIOS, isWeb} from '#/platform/detection' 14 + import {isIOS} from '#/platform/detection' 16 15 import {Shadow} from '#/state/cache/types' 17 16 import {useModalControls} from '#/state/modals' 18 17 import { ··· 81 80 }) 82 81 }, [track, openModal, profile]) 83 82 84 - const gate = useGate() 85 83 const onPressFollow = () => { 86 84 requireAuth(async () => { 87 85 try { ··· 95 93 )}`, 96 94 ), 97 95 ) 98 - if (isWeb && gate('autoexpand_suggestions_on_profile_follow_v2')) { 99 - setShowSuggestedFollows(true) 100 - } 101 96 } catch (e: any) { 102 97 if (e?.name !== 'AbortError') { 103 98 logger.error('Failed to follow', {message: String(e)})
+3 -10
src/view/com/feeds/FeedPage.tsx
··· 7 7 import {useQueryClient} from '@tanstack/react-query' 8 8 9 9 import {getRootNavigation, getTabState, TabState} from '#/lib/routes/helpers' 10 - import {logEvent, useGate} from '#/lib/statsig/statsig' 10 + import {logEvent} from '#/lib/statsig/statsig' 11 11 import {isNative} from '#/platform/detection' 12 12 import {listenSoftReset} from '#/state/events' 13 13 import {FeedFeedbackProvider, useFeedFeedback} from '#/state/feed-feedback' ··· 58 58 const feedFeedback = useFeedFeedback(feed, hasSession) 59 59 const scrollElRef = React.useRef<ListMethods>(null) 60 60 const [hasNew, setHasNew] = React.useState(false) 61 - const gate = useGate() 62 61 63 62 const scrollToTop = React.useCallback(() => { 64 63 scrollElRef.current?.scrollToOffset({ ··· 109 108 }) 110 109 }, [scrollToTop, feed, queryClient, setHasNew]) 111 110 112 - const isDiscoverFeed = 113 - feed === 114 - 'feedgen|at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot' 115 - const adjustedHasNew = 116 - hasNew && !(isDiscoverFeed && gate('disable_poll_on_discover_v2')) 117 - 118 111 return ( 119 112 <View testID={testID} style={s.h100pct}> 120 113 <MainScrollProvider> ··· 136 129 /> 137 130 </FeedFeedbackProvider> 138 131 </MainScrollProvider> 139 - {(isScrolledDown || adjustedHasNew) && ( 132 + {(isScrolledDown || hasNew) && ( 140 133 <LoadLatestBtn 141 134 onPress={onPressLoadLatest} 142 135 label={_(msg`Load new posts`)} 143 - showIndicator={adjustedHasNew} 136 + showIndicator={hasNew} 144 137 /> 145 138 )} 146 139
+5 -8
src/view/screens/Home.tsx
··· 6 6 import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' 7 7 import {useSetTitle} from '#/lib/hooks/useSetTitle' 8 8 import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 9 - import {logEvent, LogEvents, useGate} from '#/lib/statsig/statsig' 9 + import {logEvent, LogEvents} from '#/lib/statsig/statsig' 10 10 import {emitSoftReset} from '#/state/events' 11 11 import {SavedFeedSourceInfo, usePinnedFeedsInfos} from '#/state/queries/feed' 12 12 import {FeedParams} from '#/state/queries/post-feed' ··· 59 59 preferences: UsePreferencesQueryResponse 60 60 pinnedFeedInfos: SavedFeedSourceInfo[] 61 61 }) { 62 - const gate = useGate() 63 62 const requestNotificationsPermission = useRequestNotificationsPermission() 64 63 65 64 const allFeeds = React.useMemo( ··· 123 122 React.useCallback(() => { 124 123 const listener = AppState.addEventListener('change', nextAppState => { 125 124 if (nextAppState === 'active') { 126 - if ( 127 - isMobile && 128 - mode.value === 1 && 129 - gate('disable_min_shell_on_foregrounding_v3') 130 - ) { 125 + if (isMobile && mode.value === 1) { 126 + // Reveal the bottom bar so you don't miss notifications or messages. 127 + // TODO: Experiment with only doing it when unread > 0. 131 128 setMinimalShellMode(false) 132 129 } 133 130 } ··· 135 132 return () => { 136 133 listener.remove() 137 134 } 138 - }, [setMinimalShellMode, mode, isMobile, gate]), 135 + }, [setMinimalShellMode, mode, isMobile]), 139 136 ) 140 137 141 138 const onPageSelected = React.useCallback(