always show language on spacebar if multilingual typing is enabled

This commit is contained in:
Helium314 2023-11-30 09:03:19 +01:00
parent ff06aa9701
commit 9a3c631a75

View file

@ -11,6 +11,7 @@ import android.view.inputmethod.InputMethodSubtype;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import org.dslul.openboard.inputmethod.latin.RichInputMethodSubtype; import org.dslul.openboard.inputmethod.latin.RichInputMethodSubtype;
import org.dslul.openboard.inputmethod.latin.settings.Settings;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@ -37,7 +38,7 @@ public final class LanguageOnSpacebarUtils {
return FORMAT_TYPE_FULL_LOCALE; return FORMAT_TYPE_FULL_LOCALE;
} }
// Only this subtype is enabled and equals to the system locale. // Only this subtype is enabled and equals to the system locale.
if (sEnabledSubtypes.size() < 2 && sIsSystemLanguageSameAsInputLanguage) { if (sEnabledSubtypes.size() < 2 && sIsSystemLanguageSameAsInputLanguage && Settings.getInstance().getCurrent().mSecondaryLocales.isEmpty()) {
return FORMAT_TYPE_NONE; return FORMAT_TYPE_NONE;
} }
final Locale locale = subtype.getLocale(); final Locale locale = subtype.getLocale();