diff options
Diffstat (limited to 'app/javascript/mastodon/reducers/compose.js')
-rw-r--r-- | app/javascript/mastodon/reducers/compose.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 1dd49d41a..e137b774e 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -152,9 +152,13 @@ export default function compose(state = initialState, action) { .set('mounted', false) .set('is_composing', false); case COMPOSE_SENSITIVITY_CHANGE: - return state - .set('sensitive', !state.get('sensitive')) - .set('idempotencyKey', uuid()); + return state.withMutations(map => { + if (!state.get('spoiler')) { + map.set('sensitive', !state.get('sensitive')); + } + + map.set('idempotencyKey', uuid()); + }); case COMPOSE_SPOILERNESS_CHANGE: return state.withMutations(map => { map.set('spoiler_text', ''); |