Skip to content
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

fix: prevent back nav to splash page, run lint #946

Merged
merged 2 commits into from
Mar 3, 2023

Conversation

bryce-mcmath
Copy link
Contributor

Resetting the nav stack whenever the splash page is navigated from, this PR in combination with openwallet-foundation/bifold-wallet#647 should fix the majority of the back navigating issues we have been having with the iOS swipe-back and the Android hardware back button.

I also ran the linter and made the changes it demanded. In most cases where there were unused variables/imports I simply commented them out since you may want them for reference.

Signed-off-by: Bryce McMath <bryce.j.mcmath@gmail.com>
@bryce-mcmath bryce-mcmath marked this pull request as ready for review March 2, 2023 23:44
@bryce-mcmath bryce-mcmath requested review from jleach, amanji and wadeking98 and removed request for jleach March 2, 2023 23:44
Copy link
Member

@jleach jleach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a few comments to clean up but otherwise LGTM.

app/src/screens/PersonCredential.tsx Outdated Show resolved Hide resolved
@@ -204,22 +205,42 @@ const Splash: React.FC = () => {
})

if (onboardingComplete(dataAsJSON) && !attemptData?.lockoutDate) {
navigation.navigate(Screens.EnterPIN as never)
navigation.dispatch(
CommonActions.reset({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Didn't know we could do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's pretty handy! Took some researching to find how to do it

Signed-off-by: Bryce McMath <bryce.j.mcmath@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bryce-mcmath bryce-mcmath requested a review from jleach March 2, 2023 23:59
@bryce-mcmath bryce-mcmath merged commit 1b01508 into main Mar 3, 2023
@bryce-mcmath bryce-mcmath deleted the fix/navigational-issues branch March 3, 2023 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants