[Glitch] Fix `sensitive` flag not being removed when removing CW in new compose form

Port c645490d55 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2647/head
Hinaloe 2024-02-19 22:31:16 +09:00 committed by Claire
parent 200e11ae88
commit ba67ea3d12
1 changed files with 2 additions and 2 deletions

View File

@ -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: