mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 5563dc3a: Show all languages if user enables multiple subtypes
* commit '5563dc3ad51a350f67ad857991aa97623a0084b8': Show all languages if user enables multiple subtypes
This commit is contained in:
commit
f8c4d41370
@ -107,13 +107,19 @@ public class UserDictionaryList extends PreferenceFragment {
|
|||||||
protected void createUserDictSettings(PreferenceGroup userDictGroup) {
|
protected void createUserDictSettings(PreferenceGroup userDictGroup) {
|
||||||
final Activity activity = getActivity();
|
final Activity activity = getActivity();
|
||||||
userDictGroup.removeAll();
|
userDictGroup.removeAll();
|
||||||
final TreeSet<String> localeList =
|
final TreeSet<String> localeSet =
|
||||||
UserDictionaryList.getUserDictionaryLocalesSet(activity);
|
UserDictionaryList.getUserDictionaryLocalesSet(activity);
|
||||||
|
|
||||||
if (localeList.isEmpty()) {
|
if (localeSet.size() > 1) {
|
||||||
|
// Have an "All languages" entry in the languages list if there are two or more active
|
||||||
|
// languages
|
||||||
|
localeSet.add("");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (localeSet.isEmpty()) {
|
||||||
userDictGroup.addPreference(createUserDictionaryPreference(null, activity));
|
userDictGroup.addPreference(createUserDictionaryPreference(null, activity));
|
||||||
} else {
|
} else {
|
||||||
for (String locale : localeList) {
|
for (String locale : localeSet) {
|
||||||
userDictGroup.addPreference(createUserDictionaryPreference(locale, activity));
|
userDictGroup.addPreference(createUserDictionaryPreference(locale, activity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user