Remove starterpack gate (#4645)

zio/stable
Hailey 2024-06-25 17:02:43 -07:00 committed by GitHub
parent dd2e173514
commit b23f112689
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 9 deletions

View File

@ -5,4 +5,3 @@ export type Gate =
| 'request_notifications_permission_after_onboarding_v2' | 'request_notifications_permission_after_onboarding_v2'
| 'show_avi_follow_button' | 'show_avi_follow_button'
| 'show_follow_back_label_v2' | 'show_follow_back_label_v2'
| 'starter_packs_enabled'

View File

@ -27,15 +27,12 @@ import {useAgent, useSession} from '#/state/session'
import {useSetDrawerSwipeDisabled, useSetMinimalShellMode} from '#/state/shell' import {useSetDrawerSwipeDisabled, useSetMinimalShellMode} from '#/state/shell'
import {useComposerControls} from '#/state/shell/composer' import {useComposerControls} from '#/state/shell/composer'
import {useAnalytics} from 'lib/analytics/analytics' import {useAnalytics} from 'lib/analytics/analytics'
import {IS_DEV, IS_TESTFLIGHT} from 'lib/app-info'
import {useSetTitle} from 'lib/hooks/useSetTitle' import {useSetTitle} from 'lib/hooks/useSetTitle'
import {ComposeIcon2} from 'lib/icons' import {ComposeIcon2} from 'lib/icons'
import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types' import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
import {useGate} from 'lib/statsig/statsig'
import {combinedDisplayName} from 'lib/strings/display-names' import {combinedDisplayName} from 'lib/strings/display-names'
import {isInvalidHandle} from 'lib/strings/handles' import {isInvalidHandle} from 'lib/strings/handles'
import {colors, s} from 'lib/styles' import {colors, s} from 'lib/styles'
import {isWeb} from 'platform/detection'
import {listenSoftReset} from 'state/events' import {listenSoftReset} from 'state/events'
import {useActorStarterPacksQuery} from 'state/queries/actor-starter-packs' import {useActorStarterPacksQuery} from 'state/queries/actor-starter-packs'
import {PagerWithHeader} from 'view/com/pager/PagerWithHeader' import {PagerWithHeader} from 'view/com/pager/PagerWithHeader'
@ -170,9 +167,6 @@ function ProfileScreenLoaded({
const [currentPage, setCurrentPage] = React.useState(0) const [currentPage, setCurrentPage] = React.useState(0)
const {_} = useLingui() const {_} = useLingui()
const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled() const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled()
const gate = useGate()
const starterPacksEnabled =
IS_DEV || IS_TESTFLIGHT || (!isWeb && gate('starter_packs_enabled'))
const [scrollViewTag, setScrollViewTag] = React.useState<number | null>(null) const [scrollViewTag, setScrollViewTag] = React.useState<number | null>(null)
@ -205,8 +199,7 @@ function ProfileScreenLoaded({
const showLikesTab = isMe const showLikesTab = isMe
const showFeedsTab = isMe || (profile.associated?.feedgens || 0) > 0 const showFeedsTab = isMe || (profile.associated?.feedgens || 0) > 0
const showStarterPacksTab = const showStarterPacksTab =
starterPacksEnabled && isMe || !!starterPacksQuery.data?.pages?.[0].starterPacks.length
(isMe || !!starterPacksQuery.data?.pages?.[0].starterPacks.length)
const showListsTab = const showListsTab =
hasSession && (isMe || (profile.associated?.lists || 0) > 0) hasSession && (isMe || (profile.associated?.lists || 0) > 0)