Fix being unable to unmark media as sensitive when "always mark media as sensitive" is enabled (#39339)

This commit is contained in:
matrix07012
2026-06-10 09:27:38 +00:00
committed by GitHub
parent c51eb56a90
commit f2094164c4
2 changed files with 10 additions and 4 deletions
@@ -220,7 +220,9 @@ class ComposeForm extends ImmutablePureComponent {
} else if(prevProps.isSubmitting && !this.props.isSubmitting) {
this.textareaRef.current.focus();
} else if (this.props.spoiler !== prevProps.spoiler) {
if (this.props.spoiler) {
const mediaJustAdded = this.props.anyMedia && !prevProps.anyMedia;
if (this.props.spoiler && !mediaJustAdded) {
this.spoilerText.input.focus();
} else if (prevProps.spoiler) {
this.textareaRef.current.focus();