about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-21 16:44:12 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 16:44:12 -0500
commitd9b62e5d11de91bcbc2efd6d0a14222900a50ed5 (patch)
treed2dd89de3b6e51cdabdfa98d34e7252a89437f6b /app/javascript/flavours
parent58f78a7af2010d112111e40c01e2454ab82326af (diff)
make canceling a reply not take your roar out with it
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/reducers/compose.js9
1 files changed, 9 insertions, 0 deletions
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);