Skip to content
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

Conversation

lsim
Copy link
Contributor

@lsim lsim commented Jun 10, 2023

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

@lsim
Copy link
Contributor Author

lsim commented Jun 10, 2023

Having a look at the linter problems

@lsim
Copy link
Contributor Author

lsim commented Jun 10, 2023

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.

@lsim
Copy link
Contributor Author

lsim commented Jun 11, 2023

Hm - weird. CI is failing on something I already pushed a fix for (unused import). I think github has gotten confused :)

@twizmwazin twizmwazin enabled auto-merge (squash) June 11, 2023 23:44
@twizmwazin twizmwazin merged commit 9bbecaf into LemmyNet:main Jun 11, 2023
@lsim lsim deleted the feature/lsim/390-hide-downvote-button-when-downvoting-disabled branch June 12, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide downvote button when downvoting is disabled
4 participants