-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 restoring software license dialog #10436
Conversation
bae8e9d
to
8a3f69f
Compare
7c45fc4
to
56765eb
Compare
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.
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! |
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