Merge remote-tracking branch 'origin/fork' into fork

This commit is contained in:
LucasGGamerM 2022-12-15 15:01:21 -03:00
commit c9792ced32
1 changed files with 5 additions and 0 deletions

View File

@ -694,6 +694,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
return languageButton;
}
private void setDefaultLanguage(String language) {
GlobalUserPreferences.defaultLanguages.put(accountID, language);
}
@Override
public boolean onOptionsItemSelected(MenuItem item){
return true;
@ -850,6 +854,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
newRecentLanguages.remove(language);
newRecentLanguages.add(0, language);
recentLanguages.put(accountID, newRecentLanguages.stream().limit(4).collect(Collectors.toList()));
setDefaultLanguage(language);
GlobalUserPreferences.save();
}
}