From 7fdf54ec6131cda1426021505ce5f1bc5a69c6d9 Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Fri, 27 Sep 2024 18:21:39 +0300 Subject: [PATCH] Disable neutral punctuation suggestions --- java/src/org/futo/inputmethod/latin/LatinIMELegacy.java | 5 +---- .../org/futo/inputmethod/latin/settings/SettingsValues.java | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java b/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java index b45ff0a50..75dae7d50 100644 --- a/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java +++ b/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java @@ -1617,10 +1617,7 @@ public class LatinIMELegacy implements KeyboardActionListener, // punctuation suggestions (if it's disabled). @Override public void setNeutralSuggestionStrip() { - final SettingsValues currentSettings = mSettings.getCurrent(); - final SuggestedWords neutralSuggestions = currentSettings.mBigramPredictionEnabled - ? SuggestedWords.getEmptyInstance() - : currentSettings.mSpacingAndPunctuations.mSuggestPuncList; + final SuggestedWords neutralSuggestions = SuggestedWords.getEmptyInstance(); setSuggestedWords(neutralSuggestions); } diff --git a/java/src/org/futo/inputmethod/latin/settings/SettingsValues.java b/java/src/org/futo/inputmethod/latin/settings/SettingsValues.java index c98150ccf..8a6f619a6 100644 --- a/java/src/org/futo/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/org/futo/inputmethod/latin/settings/SettingsValues.java @@ -164,8 +164,8 @@ public class SettingsValues { final String autoCorrectionThresholdRawValue = mAutoCorrectEnabled ? res.getString(R.string.auto_correction_threshold_mode_index_modest) : res.getString(R.string.auto_correction_threshold_mode_index_off); - mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res); mTransformerPredictionEnabled = readTransformerPredictionEnabled(prefs, res); + mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res) || mTransformerPredictionEnabled; mDoubleSpacePeriodTimeout = res.getInteger(R.integer.config_double_space_period_timeout); mHasHardwareKeyboard = Settings.readHasHardwareKeyboard(res.getConfiguration()); mEnableMetricsLogging = prefs.getBoolean(Settings.PREF_ENABLE_METRICS_LOGGING, true);