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());
|
setStatusText(mInputMode.toString());
|
||||||
setDarkTheme();
|
setDarkTheme();
|
||||||
mainView.render();
|
mainView.render();
|
||||||
|
|
||||||
|
if (!isInputViewShown()) {
|
||||||
|
updateInputViewShown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -100,7 +104,6 @@ public class TraditionalT9 extends HotkeyHandler {
|
||||||
initUi();
|
initUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateInputViewShown();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,6 +124,10 @@ public class TraditionalT9 extends HotkeyHandler {
|
||||||
setStatusIcon(0);
|
setStatusIcon(0);
|
||||||
setStatusText("--");
|
setStatusText("--");
|
||||||
|
|
||||||
|
if (isInputViewShown()) {
|
||||||
|
updateInputViewShown();
|
||||||
|
}
|
||||||
|
|
||||||
normalizationHandler.removeCallbacksAndMessages(null);
|
normalizationHandler.removeCallbacksAndMessages(null);
|
||||||
normalizationHandler.postDelayed(
|
normalizationHandler.postDelayed(
|
||||||
() -> { if (!DictionaryLoader.getInstance(this).isRunning()) WordStoreAsync.normalizeNext(); },
|
() -> { if (!DictionaryLoader.getInstance(this).isRunning()) WordStoreAsync.normalizeNext(); },
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,6 @@ public abstract class TypingHandler extends KeyPadHandler {
|
||||||
|
|
||||||
suggestionOps.set(null);
|
suggestionOps.set(null);
|
||||||
|
|
||||||
appHacks = new AppHacks(settings, connection, field, textField);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,6 +73,9 @@ public abstract class TypingHandler extends KeyPadHandler {
|
||||||
currentInputConnection = connection;
|
currentInputConnection = connection;
|
||||||
inputType = new InputType(currentInputConnection, field);
|
inputType = new InputType(currentInputConnection, field);
|
||||||
textField = new TextField(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);
|
suggestionOps.setTextField(textField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue