1
0
Fork 0

Random bugs

* ABC Mode: fixed candidate letter disappearing, when changing the text case, after the same number key has been pressed twice or more

* Predictive Mode: fixed words not being automatically capitalized if text is entered and deleted repeatedly

* fixed the on-screen keys having incorrect height
This commit is contained in:
Dimo Karaivanov 2022-11-07 17:34:41 +02:00
parent 1e88f81e77
commit 2b25eae760
4 changed files with 8 additions and 12 deletions

View file

@ -136,7 +136,6 @@ public class TraditionalT9 extends KeyPadHandler {
mInputMode.onAcceptSuggestion(mLanguage, mSuggestionView.getCurrentSuggestion());
commitCurrentSuggestion();
determineNextTextCase();
resetKeyRepeat();
return true;
@ -201,10 +200,11 @@ public class TraditionalT9 extends KeyPadHandler {
if (mInputMode.shouldAcceptCurrentSuggestion(mLanguage, key, hold, repeat)) {
mInputMode.onAcceptSuggestion(mLanguage, getComposingText());
commitCurrentSuggestion(false);
determineNextTextCase();
} else if (!InputFieldHelper.isThereText(currentInputConnection)) {
// it would have been nice to determine the text case on every key press,
// but it is somewhat resource-intensive
}
// Auto-adjust the text case before each word, if the InputMode supports it.
// We don't do it too often, because it is somewhat resource-intensive.
if (getComposingText().length() == 0) {
determineNextTextCase();
}
@ -427,9 +427,7 @@ public class TraditionalT9 extends KeyPadHandler {
// when typing a word or viewing scrolling the suggestions, only change the case
else if (!isSuggestionViewHidden()) {
mInputMode.nextTextCase();
ArrayList<String> switchedSuggestions = mInputMode.getSuggestions(mLanguage);
setSuggestions(switchedSuggestions, mSuggestionView.getCurrentIndex());
setSuggestions(mInputMode.getSuggestions(mLanguage), mSuggestionView.getCurrentIndex());
refreshComposingText();
}
// make "abc" and "ABC" separate modes from user perspective

View file

@ -24,7 +24,6 @@ public class ModeABC extends InputMode {
suggestions = new ArrayList<>();
word = String.valueOf(key);
} else if (repeat) {
suggestions = new ArrayList<>();
shouldSelectNextLetter = true;
}