Repository navigation
Revert "Fix Onboarding modal does not appear until clearing cache" #103645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,6 @@ import useGPSInProgressModal from '@hooks/useGPSInProgressModal'; | |
| import useGPSTripStateChecker from '@hooks/useGPSTripStateChecker'; | ||
| import useOnboardingFlowRouter from '@hooks/useOnboardingFlow'; | ||
| import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
| import useRootNavigationState from '@hooks/useRootNavigationState'; | ||
| import useShouldSuppressPromotionalUI from '@hooks/useShouldSuppressPromotionalUI'; | ||
| import {SidebarOrderedReportsContextProvider} from '@hooks/useSidebarOrderedReports'; | ||
| import useStyleUtils from '@hooks/useStyleUtils'; | ||
|
|
@@ -138,8 +137,6 @@ function AuthScreens() { | |
| const modalCardStyleInterpolator = useModalCardStyleInterpolator(); | ||
| const {isVisitingSecureLink} = useOnboardingFlowRouter(); | ||
| const shouldSuppressPromotionalUI = useShouldSuppressPromotionalUI(); | ||
| // Subscribed to navigation state so the onboarding navigator gets registered as soon as the user leaves the validate login screen | ||
| const shouldHideOnboardingNavigator = useRootNavigationState(Navigation.shouldHideOnboardingNavigator); | ||
| useGPSTripStateChecker(); | ||
| useGPSInProgressModal(); | ||
|
|
||
|
|
@@ -359,7 +356,7 @@ function AuthScreens() { | |
| * screen in and out of the RootStack mid-session (which resets the navigator's state to its initial | ||
| * route). OnboardingGuard and useOnboardingFlowRouter gate whether/when a user actually lands here. | ||
| */} | ||
| {!shouldSuppressPromotionalUI && !isVisitingSecureLink && !shouldHideOnboardingNavigator && ( | ||
| {!shouldSuppressPromotionalUI && !isVisitingSecureLink && !Navigation.isValidateLoginFlow() && ( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If a user already in onboarding opens a validation link and Useful? React with 👍 / 👎. |
||
| <RootStack.Screen | ||
| name={NAVIGATORS.ONBOARDING_MODAL_NAVIGATOR} | ||
| options={{...rootNavigatorScreenOptions.basicModalNavigator, gestureEnabled: false}} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
AuthScreensinitially renders withVALIDATE_LOGINfocused, this condition omitsONBOARDING_MODAL_NAVIGATOR, but the component no longer subscribes to root navigation-state changes. On a fresh sign-up where the onboarding data finishes loading before validation completes, leaving the validation screen alone therefore neither registers the navigator nor rerunsuseOnboardingFlowRouter, so onboarding can remain absent until an unrelated rerender or app-data reset. Restore the root-navigation-state subscription so completing validation immediately updates this gate.Useful? React with 👍 / 👎.