-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Send thanks button in more details fragment #5424
Conversation
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.
Working great!
I checked all places I could think of where images are visible, then checked that the thanks were correctly sent (at https://commons.wikimedia.org/wiki/Special:Log?type=thanks&user=Syced&page=&wpdate=&tagfilter=&wpFormIdentifier=logeventslist)
@@ -431,6 +447,12 @@ public void onResume() { | |||
enableProgressBar(); | |||
} | |||
|
|||
if (AccountUtil.getUserName(getContext()) != null && media != null && AccountUtil.getUserName(getContext()).equals(media.getAuthor())) { |
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.
How about splitting this very long line?
app/src/main/res/values/strings.xml
Outdated
@@ -784,6 +784,8 @@ Upload your first media by tapping on the add button.</string> | |||
<string name="storage_permissions_denied">Storage Permissions Denied</string> | |||
<string name="unable_to_share_upload_item">Unable to share this item</string> | |||
<string name="permissions_are_required_for_functionality">Permissions are required for functionality</string> | |||
<string name="send_thanks_to_author">Send thanks to author</string> |
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.
How about a shorter "Thank the author"?
In order to fix the unit tests, would you mind rebasing (or pulling) from main? Thanks :-) |
@nicolas-raoul made the changes, sorry for the delay |
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.
Sorry for the delay, it somehow escaped my attention.
It works great and the code looks good. Thanks a lot! :-)
Description (required)
Fixes #5421
What changes did you make and why?




Send thank button will appear only when the image is not uploaded by author.
Tests performed (required)
Tested prodDebug on Samsung galaxy M31 with API level 31.
Screenshots (for UI changes only)
Need help? See https://support.google.com/android/answer/9075928
Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.