Skip to content

Commit

Permalink
Change default reply language to be default language when replying to…
Browse files Browse the repository at this point in the history
… a translated reply (mastodon#22272)

Fixes mastodon#22250
  • Loading branch information
ClearlyClaire authored and Nonexistent committed Jan 11, 2023
1 parent 6283ec5 commit 43b4c5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/javascript/mastodon/reducers/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,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) {
Expand Down

0 comments on commit 43b4c5e

Please # to comment.