From bc91069e08e0dadcb523b6e372c0c0830376706c 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 f70bdba9264bd7c572cee3c45421733919b7d03c 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 9b50ec23a..ddc3fa41e 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) {