From 9af13fa961a2b51870986c7a12d09300930773f7 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 13 Dec 2022 19:41:53 +0100 Subject: [PATCH] [Glitch] Change default reply language to be default language when replying to a translated reply Port 0e7709efce9a8c6a5a9d7dee98a37d405385cdee to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/reducers/compose.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 9b50ec23a9..ddc3fa41e3 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -421,8 +421,10 @@ export default function compose(state = initialState, action) { map.set('preselectDate', new Date()); map.set('idempotencyKey', uuid()); - if (action.status.get('language')) { + if (action.status.get('language') && !action.status.has('translation')) { map.set('language', action.status.get('language')); + } else { + map.set('language', state.get('default_language')); } if (action.status.get('spoiler_text').length > 0) {