diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts index 7fbbe8d24e..d2caa47f2a 100644 --- a/src/lib/statsig/gates.ts +++ b/src/lib/statsig/gates.ts @@ -7,4 +7,3 @@ export type Gate = | 'test_gate_1' | 'test_gate_2' | 'trending_topics_beta' - | 'yolo' diff --git a/src/screens/Profile/ProfileFeed/index.tsx b/src/screens/Profile/ProfileFeed/index.tsx index ba0f1cf5ce..8751ba3d9c 100644 --- a/src/screens/Profile/ProfileFeed/index.tsx +++ b/src/screens/Profile/ProfileFeed/index.tsx @@ -14,7 +14,6 @@ import {useSetTitle} from '#/lib/hooks/useSetTitle' import {ComposeIcon2} from '#/lib/icons' import {CommonNavigatorParams} from '#/lib/routes/types' import {NavigationProp} from '#/lib/routes/types' -import {useGate} from '#/lib/statsig/statsig' import {makeRecordUri} from '#/lib/strings/url-helpers' import {s} from '#/lib/styles' import {isNative} from '#/platform/detection' @@ -190,15 +189,13 @@ export function ProfileFeedScreenInner({ return }, [_]) - const gate = useGate() const isVideoFeed = React.useMemo(() => { const isBskyVideoFeed = VIDEO_FEED_URIS.includes(feedInfo.uri) const feedIsVideoMode = feedInfo.contentMode === AppBskyFeedDefs.CONTENTMODEVIDEO - const isFeatureEnabled = gate('yolo') const _isVideoFeed = isBskyVideoFeed || feedIsVideoMode - return isFeatureEnabled && isNative && _isVideoFeed - }, [gate, feedInfo]) + return isNative && _isVideoFeed + }, [feedInfo]) return ( <> diff --git a/src/screens/Settings/ContentAndMediaSettings.tsx b/src/screens/Settings/ContentAndMediaSettings.tsx index 0b17530b50..e28c98803c 100644 --- a/src/screens/Settings/ContentAndMediaSettings.tsx +++ b/src/screens/Settings/ContentAndMediaSettings.tsx @@ -1,11 +1,9 @@ -import React from 'react' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {NativeStackScreenProps} from '@react-navigation/native-stack' import {CommonNavigatorParams} from '#/lib/routes/types' import {logEvent} from '#/lib/statsig/statsig' -import {useGate} from '#/lib/statsig/statsig' import {isNative} from '#/platform/detection' import {useAutoplayDisabled, useSetAutoplayDisabled} from '#/state/preferences' import { @@ -42,10 +40,6 @@ export function ContentAndMediaSettingsScreen({}: Props) { const {trendingDisabled, trendingVideoDisabled} = useTrendingSettings() const {setTrendingDisabled, setTrendingVideoDisabled} = useTrendingSettingsApi() - const gate = useGate() - const areVideoFeedsEnabled = React.useMemo(() => { - return gate('yolo') - }, [gate]) return ( @@ -145,31 +139,27 @@ export function ContentAndMediaSettingsScreen({}: Props) { - {areVideoFeedsEnabled && ( - { - const hide = Boolean(!value) - if (hide) { - logEvent('trendingVideos:hide', {context: 'settings'}) - } else { - logEvent('trendingVideos:show', {context: 'settings'}) - } - setTrendingVideoDisabled(hide) - }}> - - - - - Enable trending videos in your Discover feed - - - - - - )} + { + const hide = Boolean(!value) + if (hide) { + logEvent('trendingVideos:hide', {context: 'settings'}) + } else { + logEvent('trendingVideos:show', {context: 'settings'}) + } + setTrendingVideoDisabled(hide) + }}> + + + + Enable trending videos in your Discover feed + + + + )} diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx index 71d8136621..f643adaf9f 100644 --- a/src/view/com/feeds/FeedPage.tsx +++ b/src/view/com/feeds/FeedPage.tsx @@ -11,7 +11,6 @@ import {ComposeIcon2} from '#/lib/icons' import {getRootNavigation, getTabState, TabState} from '#/lib/routes/helpers' import {AllNavigatorParams} from '#/lib/routes/types' import {logEvent} from '#/lib/statsig/statsig' -import {useGate} from '#/lib/statsig/statsig' import {s} from '#/lib/styles' import {isNative} from '#/platform/detection' import {listenSoftReset} from '#/state/events' @@ -66,15 +65,13 @@ export function FeedPage({ const scrollElRef = React.useRef(null) const [hasNew, setHasNew] = React.useState(false) const setHomeBadge = useSetHomeBadge() - const gate = useGate() const isVideoFeed = React.useMemo(() => { const isBskyVideoFeed = VIDEO_FEED_URIS.includes(feedInfo.uri) const feedIsVideoMode = feedInfo.contentMode === AppBskyFeedDefs.CONTENTMODEVIDEO - const isFeatureEnabled = gate('yolo') const _isVideoFeed = isBskyVideoFeed || feedIsVideoMode - return isFeatureEnabled && isNative && _isVideoFeed - }, [gate, feedInfo]) + return isNative && _isVideoFeed + }, [feedInfo]) React.useEffect(() => { if (isPageFocused) { diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx index ab7fff24d9..554415faf1 100644 --- a/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx @@ -17,7 +17,6 @@ import {useQueryClient} from '@tanstack/react-query' import {DISCOVER_FEED_URI, KNOWN_SHUTDOWN_FEEDS} from '#/lib/constants' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' -import {useGate} from '#/lib/statsig/statsig' import {logEvent} from '#/lib/statsig/statsig' import {useTheme} from '#/lib/ThemeContext' import {logger} from '#/logger' @@ -200,10 +199,7 @@ let PostFeed = ({ const lastFetchRef = React.useRef(Date.now()) const [feedType, feedUri, feedTab] = feed.split('|') const {gtMobile, gtTablet} = useBreakpoints() - const gate = useGate() - const areVideoFeedsEnabled = React.useMemo(() => { - return isNative && gate('yolo') - }, [gate]) + const areVideoFeedsEnabled = isNative const feedCacheKey = feedParams?.feedCacheKey const opts = React.useMemo( diff --git a/src/view/screens/Search/Explore.tsx b/src/view/screens/Search/Explore.tsx index 3b8386263b..c5af9607b3 100644 --- a/src/view/screens/Search/Explore.tsx +++ b/src/view/screens/Search/Explore.tsx @@ -10,7 +10,6 @@ import { import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useGate} from '#/lib/statsig/statsig' import {cleanError} from '#/lib/strings/errors' import {logger} from '#/logger' import {isNative, isWeb} from '#/platform/detection' @@ -309,7 +308,6 @@ export function Explore() { error: feedsError, fetchNextPage: fetchNextFeedsPage, } = useGetPopularFeedsQuery({limit: 10}) - const gate = useGate() const isLoadingMoreProfiles = isFetchingNextProfilesPage && !isLoadingProfiles const onLoadMoreProfiles = React.useCallback(async () => { @@ -350,7 +348,7 @@ export function Explore() { key: `trending-topics`, }) - if (isNative && gate('yolo')) { + if (isNative) { i.push({ type: 'trendingVideos', key: `trending-videos`, @@ -510,7 +508,6 @@ export function Explore() { preferencesError, hasNextProfilesPage, hasNextFeedsPage, - gate, ]) const renderItem = React.useCallback(