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 NSFW field for create post form, for NSFW communities. #2887

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

dessalines
Copy link
Member

Description

Hides the NSFW field on create post for NSFW communities.

A back-end PR will also handle making that a default.

Screenshots

Screenshot_20250107_165941_Kiwi Browser

@@ -908,6 +909,9 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {

handleSiteEnableNsfwChange(i: SiteForm, event: any) {
i.state.siteForm.enable_nsfw = event.target.checked;
if (!event.target.checked) {
i.state.siteForm.content_warning = "";
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that enable_nsfw is actually unused in the backend and removed it (LemmyNet/lemmy#5311). So it should also be removed here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll handle that on the next lemmy-js-client types generation. This form field at least just uses a checkbox to show the content warning field.

@dessalines dessalines merged commit dafc33d into main Jan 10, 2025
2 checks passed
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.

Tick the "NSFW" checkbox per default if a user creates a new post in a NSFW community
3 participants