This repository was archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 487
Fix PopupTo Backstack issue (EXPOSUREAPP-4123) #1813
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chiljamgossow
previously approved these changes
Dec 7, 2020
d4rken
reviewed
Dec 7, 2020
Member
d4rken
left a comment
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.
Did not work for all screens.
- Scan positive QR code
- Give consent
- Click "Finish" without symptom input
- We end up on the home screen but on "back button" we still end up on the test result.
Same when ending the submission from SubmissionSymptomIntroductionFragment.
I've added the proposed solution with app:popUpTo="@id/nav_graph" to all navgraph actions leading from submission to the home fragment and it works for me now.
Please retest/review this @ritsam @chiljamgossow
Contributor
|
I cleaned up the graph. The app should only close after the mainFragment is shown. Many actions popUpTo mainFragment with popUpInclusive = true, so the mainFragment gets removed from the stack and any following popUpTo mainFragment has no effect. |
chiljamgossow
approved these changes
Dec 8, 2020
Oliver-Zimmerman
approved these changes
Dec 8, 2020
ralfgehrer
approved these changes
Dec 8, 2020
|
Kudos, SonarCloud Quality Gate passed! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Back navigation popupstack fixed
Steps to reproduce
Testing with release 1.9.x
Positive QR Code scanned > consent aborted by refusing to submit keys > ending up on the home screen. >
Click "Andere Warnen" on the home screen > consented > shared keys > Submit keys without symptoms > come back on the screen by selecting yes in the popup > The app should close on Android's back key press. but it comes back to the thank you screen again.
This behaviour is the same for all the screens in Submission No consent Keys flow ( only till thank you screen)
Testing with this PR
Perform all the actions as above but when clicked back button on home screen, the App should close now instead of going back to the previous fragment.
Changes
nav_graph has been updated where app:popUpTo="@id/mainFragment" is replaced with app:popUpTo="@id/nav_graph"
Reason for this change
Somehow there could be multiple instances of mainfragment in the backstack. we're clearing the backstack completely to make a fresh start each time we navigate to mainfragment