From 3ebf3d4734db3941465e1777f8726758424dbf45 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 8 Nov 2022 10:15:13 +0100 Subject: [PATCH] adding a crashfix --- .../simplemobiletools/keyboard/services/SimpleKeyboardIME.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt index 90e960b..41309e4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -162,7 +162,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL if (keyboardMode != KEYBOARD_LETTERS && code == MyKeyboard.KEYCODE_SPACE) { val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0)?.text ?: return inputConnection.commitText(codeChar.toString(), 1) - val newText = inputConnection.getExtractedText(ExtractedTextRequest(), 0).text + val newText = inputConnection.getExtractedText(ExtractedTextRequest(), 0)?.text switchToLetters = originalText != newText } else { inputConnection.commitText(codeChar.toString(), 1)