From 6bb49ee1a000ab4b653621511c32056aaeb0143b Mon Sep 17 00:00:00 2001 From: Helium314 Date: Wed, 1 May 2024 20:39:46 +0200 Subject: [PATCH] fix broken build --- app/src/main/java/helium314/keyboard/latin/Suggest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/helium314/keyboard/latin/Suggest.kt b/app/src/main/java/helium314/keyboard/latin/Suggest.kt index 45c3e07fa..a5188a4dd 100644 --- a/app/src/main/java/helium314/keyboard/latin/Suggest.kt +++ b/app/src/main/java/helium314/keyboard/latin/Suggest.kt @@ -118,7 +118,7 @@ class Suggest(private val mDictionaryFacilitator: DictionaryFacilitator) { // If there is an incoming autocorrection, make sure typed word is shown, so user is able to override it. // Otherwise, if the relevant setting is enabled, show the typed word in the middle. val indexOfTypedWord = if (hasAutoCorrection) 2 else 1 - if ((hasAutoCorrection || Settings.getInstance().current.mCenterSuggestionTextToCommit) + if ((hasAutoCorrection || Settings.getInstance().current.mCenterSuggestionTextToEnter) && suggestionsList.size >= indexOfTypedWord && !TextUtils.isEmpty(typedWordString)) { if (typedWordFirstOccurrenceWordInfo != null) { if (SuggestionStripView.DEBUG_SUGGESTIONS) addDebugInfo(typedWordFirstOccurrenceWordInfo, typedWordString)