Skip to content

Commit

Permalink
Fix sensitive flag not being removed when removing CW in new compos…
Browse files Browse the repository at this point in the history
…e form (mastodon#29248)
  • Loading branch information
hinaloe authored Feb 19, 2024
1 parent ad16362 commit c645490
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/javascript/mastodon/reducers/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c645490

Please sign in to comment.