From c645490d553124d800d30488595f7d2d9d61584d Mon Sep 17 00:00:00 2001 From: Hinaloe Date: Mon, 19 Feb 2024 22:31:16 +0900 Subject: [PATCH] Fix `sensitive` flag not being removed when removing CW in new compose form (#29248) --- app/javascript/mastodon/reducers/compose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index f57bbb77b..f1bc0cbae 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -315,8 +315,8 @@ export default function compose(state = initialState, action) { map.set('spoiler', !state.get('spoiler')); map.set('idempotencyKey', uuid()); - if (!state.get('sensitive') && state.get('media_attachments').size >= 1) { - map.set('sensitive', true); + if (state.get('media_attachments').size >= 1 && !state.get('default_sensitive')) { + map.set('sensitive', !state.get('spoiler')); } }); case COMPOSE_SPOILER_TEXT_CHANGE: