-
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
Hide downvote button on comments and posts when disabled #502
Hide downvote button on comments and posts when disabled #502
Conversation
…es not have downvotes enabled LemmyNet#390
…ownvoting-disabled
Having a look at the linter problems |
The only way I could figure out to test it was to hardcode the new conditionals to false and see that the UI was as expected. So if the LocalSite.downvotes_enabled gives the right value it should work. Happy to do some more testing if you can teach me a better way to set that flag (I don't have my own lemmy test instance - yet). /Edit - just realised I can fiddle with the setting in SampleData to at least see the change in the preview. Seems to work fine. |
app/src/main/java/com/jerboa/ui/components/comment/CommentNode.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/jerboa/ui/components/comment/CommentNode.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt
Outdated
Show resolved
Hide resolved
…ownvoting-disabled
Also - fix another broken preview LemmyNet#390
Hm - weird. CI is failing on something I already pushed a fix for (unused import). I think github has gotten confused :) |
…ownvoting-disabled
…ownvoting-disabled
Please have a look at this - it's my first 'proper' PR. I may have violated any number of code style rules and what not.
I'm threading a
siteView
into the two composables where a check is needed in order to not render the downvote button.Githubs differ got a bit confused due to the indentation change. There shouldn't be any surprises in those parts, though.
Fixes #390