-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix restoring software license dialog #10436
Merged
Merged
Conversation
This file contains 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
bae8e9d
to
8a3f69f
Compare
7c45fc4
to
56765eb
Compare
Stypox
requested changes
Sep 21, 2023
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.
The neutral button "open website license" disappears on rotation, right? Since you don't distinguish between SoftwareComponent
and License
. Also, setting the activeLicense
should happen from inside showLicense
, not right before calling it.
Stypox
approved these changes
Sep 21, 2023
Do not restore last opened license after a rotation change when the license was closed earlier. This commit adds onCancelListener and onDismissListener to the AlertDialogs which are used to display the licenses.
Do not keep the active License but the active SoftwareComponent.
Rename string res "recaptcha_done_button" to "done".
5955b51
to
94c1438
Compare
Kudos, SonarCloud Quality Gate passed! |
This was referenced Oct 5, 2023
Merged
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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.
What is it?
Description of the changes in your PR
The last viewed license was re-opened after an orientation change in the About and License Fragments even if the license view/dialog has been closed by the user earlier. I needed to move the method creating the AlertDialog into the Fragment class to access
activeLicense
. An alternative implementation would have been to pass the listener as variable. But I think that the AlertDialog creation is part of the Fragment and should therefore be in the LicenseFragment and not a helper class.The dialog buttons to open the software's website is also restored correctly after a rotation change now.
Before/After Screenshots/Screen Record
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence