From ba67ea3d1266f04ac3ee5b5d43dcfd122ac6e730 Mon Sep 17 00:00:00 2001 From: Hinaloe Date: Mon, 19 Feb 2024 22:31:16 +0900 Subject: [PATCH] [Glitch] Fix `sensitive` flag not being removed when removing CW in new compose form Port c645490d553124d800d30488595f7d2d9d61584d to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/reducers/compose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 05681738c5..787e7ee2db 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -395,8 +395,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: