mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
fix some missed cases of using langauge tag instead of locale string
string conversion was implicit, so a bit harder to find fixes #469
This commit is contained in:
parent
faf75963a8
commit
27f2492edd
4 changed files with 7 additions and 22 deletions
|
@ -579,14 +579,14 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
|
||||
public static void setSecondaryLocales(final SharedPreferences prefs, final Locale mainLocale, final List<Locale> locales) {
|
||||
if (locales.isEmpty()) {
|
||||
prefs.edit().putString(PREF_SECONDARY_LOCALES_PREFIX + mainLocale, "").apply();
|
||||
prefs.edit().putString(PREF_SECONDARY_LOCALES_PREFIX + mainLocale.toLanguageTag(), "").apply();
|
||||
return;
|
||||
}
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (Locale locale : locales) {
|
||||
sb.append(";").append(locale.toLanguageTag());
|
||||
}
|
||||
prefs.edit().putString(PREF_SECONDARY_LOCALES_PREFIX + mainLocale, sb.toString()).apply();
|
||||
prefs.edit().putString(PREF_SECONDARY_LOCALES_PREFIX + mainLocale.toLanguageTag(), sb.toString()).apply();
|
||||
}
|
||||
|
||||
public static Colors getColorsForCurrentTheme(final Context context, final SharedPreferences prefs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue