Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

ungate trending (#7696)

authored by

Samuel Newman and committed by
GitHub
7d694f60 0d1d0d8f

+3 -17
-1
src/lib/statsig/gates.ts
··· 7 7 | 'remove_show_latest_button' 8 8 | 'test_gate_1' 9 9 | 'test_gate_2' 10 - | 'trending_topics_beta'
+3 -16
src/state/trending-config.tsx
··· 1 1 import React from 'react' 2 2 3 - import {useGate} from '#/lib/statsig/statsig' 4 3 import {useLanguagePrefs} from '#/state/preferences/languages' 5 4 import {useServiceConfigQuery} from '#/state/queries/service-config' 6 5 import {device} from '#/storage' ··· 14 13 }) 15 14 16 15 export function Provider({children}: React.PropsWithChildren<{}>) { 17 - const gate = useGate() 18 16 const langPrefs = useLanguagePrefs() 19 17 const {data: config, isLoading: isInitialLoad} = useServiceConfigQuery() 20 18 const ctx = React.useMemo<Context>(() => { ··· 45 43 * the server, we can exit early. 46 44 */ 47 45 const enabled = Boolean(config?.topicsEnabled) 48 - if (!enabled) { 49 - // cache for next reload 50 - device.set(['trendingBetaEnabled'], enabled) 51 - return {enabled: false} 52 - } 53 - 54 - /* 55 - * Service is enabled, but also check statsig in case we're rolling back. 56 - */ 57 - const gateEnabled = gate('trending_topics_beta') 58 - const _enabled = enabled && gateEnabled 59 46 60 47 // update cache 61 - device.set(['trendingBetaEnabled'], _enabled) 48 + device.set(['trendingBetaEnabled'], enabled) 62 49 63 - return {enabled: _enabled} 64 - }, [isInitialLoad, config, gate, langPrefs.contentLanguages]) 50 + return {enabled} 51 + }, [isInitialLoad, config, langPrefs.contentLanguages]) 65 52 return <Context.Provider value={ctx}>{children}</Context.Provider> 66 53 } 67 54