adjust notifications experiment by removing canAskAgain (#4271)

* adjust notifications experiment by removing `canAskAgain`

* move to `StepFinished` for after onboarding
This commit is contained in:
Hailey 2024-05-29 18:42:12 -07:00 committed by GitHub
parent 165feedb86
commit eb6f44853d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 44 additions and 45 deletions

View file

@ -20,7 +20,6 @@ import {
} from '#/state/shell'
import {useSelectedFeed, useSetSelectedFeed} from '#/state/shell/selected-feed'
import {useOTAUpdates} from 'lib/hooks/useOTAUpdates'
import {useRequestNotificationsPermission} from 'lib/notifications/notifications'
import {HomeTabNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
import {FeedPage} from 'view/com/feeds/FeedPage'
import {Pager, PagerRef, RenderTabBarFnProps} from 'view/com/pager/Pager'
@ -59,8 +58,6 @@ function HomeScreenReady({
preferences: UsePreferencesQueryResponse
pinnedFeedInfos: SavedFeedSourceInfo[]
}) {
const requestNotificationsPermission = useRequestNotificationsPermission()
const allFeeds = React.useMemo(
() => pinnedFeedInfos.map(f => f.feedDescriptor),
[pinnedFeedInfos],
@ -74,10 +71,6 @@ function HomeScreenReady({
useSetTitle(pinnedFeedInfos[selectedIndex]?.displayName)
useOTAUpdates()
React.useEffect(() => {
requestNotificationsPermission('AfterOnboarding')
}, [requestNotificationsPermission])
const pagerRef = React.useRef<PagerRef>(null)
const lastPagerReportedIndexRef = React.useRef(selectedIndex)
React.useLayoutEffect(() => {