Tis broken. Just need to fix MastodonLanguage.java getDefaultLanguge. I am still trying to figure out where it is stored

This commit is contained in:
LucasGGamerM 2022-12-15 14:56:11 -03:00
parent 5d87fb7b67
commit a3fb09a33c
2 changed files with 2 additions and 6 deletions

View File

@ -667,7 +667,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
languageButton.setCompoundDrawableTintList(languageButton.getTextColors()); languageButton.setCompoundDrawableTintList(languageButton.getTextColors());
languageButton.setCompoundDrawablePadding(V.dp(6)); languageButton.setCompoundDrawablePadding(V.dp(6));
updateLanguage(languageResolver.getDefault()); updateLanguage(languageResolver.getDefault(accountID));
languagePopup=new PopupMenu(getActivity(), languageButton); languagePopup=new PopupMenu(getActivity(), languageButton);
languageButton.setOnTouchListener(languagePopup.getDragToOpenListener()); languageButton.setOnTouchListener(languagePopup.getDragToOpenListener());
languageButton.setOnClickListener(v->languagePopup.show()); languageButton.setOnClickListener(v->languagePopup.show());

View File

@ -95,11 +95,7 @@ public class MastodonLanguage {
} }
public MastodonLanguage getDefault(String accountID) { public MastodonLanguage getDefault(String accountID) {
if(GlobalUserPreferences.defaultLanguages.get(accountID)==null){
GlobalUserPreferences.defaultLanguages.put(accountID, Locale.getDefault().getLanguage());
return from(Locale.getDefault().getLanguage());
}
return from(GlobalUserPreferences.defaultLanguages.get(accountID));
} }
} }
} }