fixed unnecessary restarts, causing AppHacks to contain an invalid TextField, effectively making typing in Termux impossible
This commit is contained in:
parent
a3724bb80c
commit
af6ee5114f
2 changed files with 11 additions and 3 deletions
|
|
@ -82,6 +82,10 @@ public class TraditionalT9 extends HotkeyHandler {
|
|||
setStatusText(mInputMode.toString());
|
||||
setDarkTheme();
|
||||
mainView.render();
|
||||
|
||||
if (!isInputViewShown()) {
|
||||
updateInputViewShown();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -100,7 +104,6 @@ public class TraditionalT9 extends HotkeyHandler {
|
|||
initUi();
|
||||
}
|
||||
|
||||
updateInputViewShown();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -121,6 +124,10 @@ public class TraditionalT9 extends HotkeyHandler {
|
|||
setStatusIcon(0);
|
||||
setStatusText("--");
|
||||
|
||||
if (isInputViewShown()) {
|
||||
updateInputViewShown();
|
||||
}
|
||||
|
||||
normalizationHandler.removeCallbacksAndMessages(null);
|
||||
normalizationHandler.postDelayed(
|
||||
() -> { if (!DictionaryLoader.getInstance(this).isRunning()) WordStoreAsync.normalizeNext(); },
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ public abstract class TypingHandler extends KeyPadHandler {
|
|||
|
||||
suggestionOps.set(null);
|
||||
|
||||
appHacks = new AppHacks(settings, connection, field, textField);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -75,6 +73,9 @@ public abstract class TypingHandler extends KeyPadHandler {
|
|||
currentInputConnection = connection;
|
||||
inputType = new InputType(currentInputConnection, field);
|
||||
textField = new TextField(currentInputConnection, field);
|
||||
|
||||
// changing the TextField and notifying all interested classes is an atomic operation
|
||||
appHacks = new AppHacks(settings, connection, field, textField);
|
||||
suggestionOps.setTextField(textField);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue