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
This commit is contained in:
parent
3ca41e4efb
commit
e6e7027d01
4 changed files with 9 additions and 30 deletions
|
@ -7,7 +7,7 @@ import {useNavigation} from '@react-navigation/native'
|
|||
import {useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {getRootNavigation, getTabState, TabState} from '#/lib/routes/helpers'
|
||||
import {logEvent, useGate} from '#/lib/statsig/statsig'
|
||||
import {logEvent} from '#/lib/statsig/statsig'
|
||||
import {isNative} from '#/platform/detection'
|
||||
import {listenSoftReset} from '#/state/events'
|
||||
import {FeedFeedbackProvider, useFeedFeedback} from '#/state/feed-feedback'
|
||||
|
@ -58,7 +58,6 @@ export function FeedPage({
|
|||
const feedFeedback = useFeedFeedback(feed, hasSession)
|
||||
const scrollElRef = React.useRef<ListMethods>(null)
|
||||
const [hasNew, setHasNew] = React.useState(false)
|
||||
const gate = useGate()
|
||||
|
||||
const scrollToTop = React.useCallback(() => {
|
||||
scrollElRef.current?.scrollToOffset({
|
||||
|
@ -109,12 +108,6 @@ export function FeedPage({
|
|||
})
|
||||
}, [scrollToTop, feed, queryClient, setHasNew])
|
||||
|
||||
const isDiscoverFeed =
|
||||
feed ===
|
||||
'feedgen|at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot'
|
||||
const adjustedHasNew =
|
||||
hasNew && !(isDiscoverFeed && gate('disable_poll_on_discover_v2'))
|
||||
|
||||
return (
|
||||
<View testID={testID} style={s.h100pct}>
|
||||
<MainScrollProvider>
|
||||
|
@ -136,11 +129,11 @@ export function FeedPage({
|
|||
/>
|
||||
</FeedFeedbackProvider>
|
||||
</MainScrollProvider>
|
||||
{(isScrolledDown || adjustedHasNew) && (
|
||||
{(isScrolledDown || hasNew) && (
|
||||
<LoadLatestBtn
|
||||
onPress={onPressLoadLatest}
|
||||
label={_(msg`Load new posts`)}
|
||||
showIndicator={adjustedHasNew}
|
||||
showIndicator={hasNew}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue