From cdb0bed56a17e43e639941a86dfd94e17661b2ba Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Thu, 18 Apr 2024 17:12:41 -0500 Subject: [PATCH] Disable transformer swipe typing --- java/src/org/futo/inputmethod/latin/xlm/LanguageModel.kt | 6 ++++++ .../futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/java/src/org/futo/inputmethod/latin/xlm/LanguageModel.kt b/java/src/org/futo/inputmethod/latin/xlm/LanguageModel.kt index 3768ea845..e0bb614c0 100644 --- a/java/src/org/futo/inputmethod/latin/xlm/LanguageModel.kt +++ b/java/src/org/futo/inputmethod/latin/xlm/LanguageModel.kt @@ -194,6 +194,12 @@ class LanguageModel( return@withContext null } + // Disable gesture for now + if(composedData.mIsBatchMode) { + return@withContext null + } + + var composeInfo = getComposeInfo(composedData, keyDetector) var context = getContext(composeInfo, ngramContext) diff --git a/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt b/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt index db6d306a1..31dd1949b 100644 --- a/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt +++ b/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt @@ -251,6 +251,12 @@ public class LanguageModelFacilitator( holder.get(null, Constants.GET_SUGGESTED_WORDS_TIMEOUT.toLong())?.let { results -> job.cancel() inputLogic.mSuggestionStripViewAccessor.showSuggestionStrip(results) + + if(values.composedData.mIsBatchMode) { + inputLogic.showBatchSuggestions(results, values.inputStyle == SuggestedWords.INPUT_STYLE_TAIL_BATCH); + } + + sequenceIdFinishedFlow.emit(values.sequenceId) } return }