From d9b62e5d11de91bcbc2efd6d0a14222900a50ed5 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 21 May 2019 16:44:12 -0500 Subject: make canceling a reply not take your roar out with it --- app/javascript/flavours/glitch/reducers/compose.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/javascript/flavours/glitch/reducers') diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 6a5d3bde8..43876e450 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -352,6 +352,15 @@ export default function compose(state = initialState, action) { }); case COMPOSE_REPLY_CANCEL: state = state.setIn(['advanced_options', 'threaded_mode'], false); + return state.withMutations(map => { + map.set('in_reply_to', null); + map.set('privacy', state.get('default_privacy')); + map.update( + 'advanced_options', + map => map.mergeWith(overwrite, state.get('default_advanced_options')) + ); + map.set('idempotencyKey', uuid()); + }); case COMPOSE_RESET: return state.withMutations(map => { map.set('in_reply_to', null); -- cgit