diff options
author | Surinna Curtis <ekiru.0@gmail.com> | 2017-07-01 17:36:56 -0500 |
---|---|---|
committer | Gô Shoemake <marrus-sh@users.noreply.github.com> | 2017-07-04 21:33:53 -0700 |
commit | 0c71c0ccc835825e4c6fb47a56bd09a237103ac6 (patch) | |
tree | b34609a9300692bd683b53a606a2762a4ca12f37 /app/javascript | |
parent | 49e82c1e0f8bf1e0662141433b0692ad86c23406 (diff) |
reset advanced options when appropriate
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/reducers/compose.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 9713f5ed9..ca22f5fbe 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -48,6 +48,9 @@ const initialState = Immutable.Map({ suggestion_token: null, suggestions: Immutable.List(), me: null, + default_advanced_options: Immutable.Map({ + do_not_federate: false + }), default_privacy: 'public', resetFileKey: Math.floor((Math.random() * 0x10000)), idempotencyKey: null, @@ -71,6 +74,7 @@ function clearAll(state) { map.set('spoiler_text', ''); map.set('is_submitting', false); map.set('in_reply_to', null); + map.set('advanced_options', state.get('default_advanced_options')); map.set('privacy', state.get('default_privacy')); map.set('sensitive', false); map.update('media_attachments', list => list.clear()); @@ -176,6 +180,7 @@ export default function compose(state = initialState, action) { map.set('in_reply_to', action.status.get('id')); map.set('text', statusToTextMentions(state, action.status)); map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy'))); + map.set('advanced_options', state.get('default_advanced_options')); map.set('focusDate', new Date()); map.set('preselectDate', new Date()); map.set('idempotencyKey', uuid()); @@ -195,6 +200,7 @@ export default function compose(state = initialState, action) { map.set('spoiler', false); map.set('spoiler_text', ''); map.set('privacy', state.get('default_privacy')); + map.set('advanced_options', state.get('default_advanced_options')); map.set('idempotencyKey', uuid()); }); case COMPOSE_SUBMIT_REQUEST: |