Fix test drive modal appearing twice on Android#81465
Fix test drive modal appearing twice on Android#81465
Conversation
|
@mananjadhav Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/hooks/useOnboardingFlow.ts
Outdated
| onboardingValues, | ||
| const navigationState = navigationRef.getRootState(); | ||
| const lastRoute = navigationState.routes.at(-1); | ||
| // Prevent duplicate navigation if the test drive modal is already shown |
There was a problem hiding this comment.
@MelvinBot NO you removed the wrong comment. Leave that one. Remove the one that was included in the NEW diff: '// Prevent duplicate navigation if the test drive modal is already shown'
|
Done! Removed the outdated TODO comment since the navigation guard for the Test Drive modal has been implemented in this PR. |
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
Co-authored-by: Jules <Julesssss@users.noreply.github.com>
ade589f to
cbcdf15
Compare
|
Sorry about that! I've now removed the correct comment ( |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
I have merged the revert |
Explanation of Change
Fixes the test drive modal appearing twice during onboarding on Android, which was causing tabs to become unresponsive. The issue was caused by two independent navigation triggers racing to show the modal when onboarding completes.
I think it's okay to implement this as the fix, we should be refactoring this logic away as a follow-up to the original PR, as indicated here:
Two fixes:
useOnboardingFlow.tsto prevent duplicate navigation if the modal is already shown (similar to the migrated user modal pattern)modalScreenListenerstoTestDriveModalNavigatorinAuthScreens.tsxto properly manage modal visibility state on AndroidFixed Issues
$ #81453
Tests
QA Steps
Same as tests
PR Author Checklist
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari