From c021a142ba4fcd6f7998a271f397849899ee5f35 Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Thu, 16 May 2024 14:41:50 -0500 Subject: [PATCH] Use blacklist for swipe input --- .../inputmethod/latin/xlm/LanguageModelFacilitator.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt b/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt index 5465eb495..57609baef 100644 --- a/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt +++ b/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt @@ -297,6 +297,14 @@ public class LanguageModelFacilitator( results } + finalResults.mSuggestedWordInfoList.removeAll { + !suggestionBlacklist.isSuggestedWordOk(it) + } + + finalResults.mRawSuggestions?.removeAll { + !suggestionBlacklist.isSuggestedWordOk(it) + } + inputLogic.mSuggestionStripViewAccessor.showSuggestionStrip(finalResults) if(values.composedData.mIsBatchMode) {