Allow users to clear locally stored donation history #5196
+26
−0
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.
Please Read, this is a WIP
This is my first open source contribution and this PR is still a work in progress, I hope you can help me understand how can I put the translation and if this class is easily testable, but I will take my time to see how can i write some automated tests for it.
What does this do?
This will add a new preference in the SettingsFragment that enables the user to delete the local donation history. All this done respecting the business rules defined in the Phabricator ticket. The new preference only shows if the donation history is not empty and after the user deletes it the preference hides.
Why is this needed?
Please refer to the Phabricator's link Background section
Phabricator:
https://phabricator.wikimedia.org/T380662
Screenshot