Browse Source

Fix `sensitive` flag not being removed when removing CW in new compose form (#29248)

Hinaloe 2 months ago
parent
commit
c645490d55
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/javascript/mastodon/reducers/compose.js

+ 2 - 2
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: