1
0
Fork 0

fixed unexpected or disappearing suggestions when changing the language in the middle of a word

This commit is contained in:
sspanak 2023-01-24 08:08:40 +02:00 committed by Dimo Karaivanov
parent 1a1c0ec910
commit acef3fc20d

View file

@ -283,7 +283,16 @@ public class TraditionalT9 extends KeyPadHandler {
protected boolean onKeyNextLanguage() { protected boolean onKeyNextLanguage() {
return nextLang(); if (nextLang()) {
commitCurrentSuggestion(false);
mInputMode.reset();
resetKeyRepeat();
clearSuggestions();
return true;
}
return false;
} }
@ -497,8 +506,6 @@ public class TraditionalT9 extends KeyPadHandler {
return false; return false;
} }
clearSuggestions();
// select the next language // select the next language
int previousLangId = mEnabledLanguages.indexOf(mLanguage.getId()); int previousLangId = mEnabledLanguages.indexOf(mLanguage.getId());
int nextLangId = previousLangId == -1 ? 0 : (previousLangId + 1) % mEnabledLanguages.size(); int nextLangId = previousLangId == -1 ? 0 : (previousLangId + 1) % mEnabledLanguages.size();