-
Notifications
You must be signed in to change notification settings - Fork 169
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
Adding Show Post Source button #901
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.
Looks good, and works but for the translations next time if you don't know the language don't add them. As you have no guarantee that ChatGPT doesn't generate nonsense.
One thing I would like to have changed though is when you want to see the original comment back the text still displays View post source
Maybe change this to something like View original text
(or something better)
@MV-GH I would like to change the button text but how do I do that without passing the viewSource boolean around, it seems messy. Best way that I can figure is to actually create a boolean on the postView.post saying "isSource" or something. |
Can you reuse the viewSource variable? |
app/src/main/res/values/strings.xml
Outdated
@@ -335,4 +335,5 @@ | |||
<string name="create_edit_post_close">Close</string> | |||
<string name="lang_language">Language</string> | |||
<string name="blur_nsfw">Blur NSFW images</string> | |||
<string name="post_listing_view_source">View Post Source</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.
Agree with @twizmwazin , either re-use the comment_node_view_source
string, or just make this one View Source
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.
I think he meant can't I reuse the viewSource
variable to change the button text, but @twizmwazin passing in that variable, all the way from PostListing, just to change the button text feels bad
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.
@dessalines Isn't it better that it has it's own resource string? Somewhere along the line someone might change comment_node_view_source
not thinking that it will also change for the Post Listing...
@MV-GH I've updated to use the bool for changing the button from |
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.
Tested it and works well, thx for work! Passing the bool down was the best way. For blurNSFW i had to pass it down like 10 composables
Add "View Post Source" button to Post Options Dialog to show raw text
show_source.mp4
Addressing: #506
Translations with ChatGPT