From 752f1e58feb84438b13e211d812cb9ad114d88f0 Mon Sep 17 00:00:00 2001 From: Menny Even Danan Date: Tue, 23 Feb 2016 12:01:25 -0500 Subject: fixing missing double-click-to-add. #573 --- src/main/java/com/anysoftkeyboard/AnySoftKeyboard.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/main/java/com/anysoftkeyboard/AnySoftKeyboard.java b/src/main/java/com/anysoftkeyboard/AnySoftKeyboard.java index 71e496f56..2bf9f8162 100644 --- a/src/main/java/com/anysoftkeyboard/AnySoftKeyboard.java +++ b/src/main/java/com/anysoftkeyboard/AnySoftKeyboard.java @@ -98,7 +98,6 @@ import com.anysoftkeyboard.utils.Workarounds; import com.google.android.voiceime.VoiceRecognitionTrigger; import com.menny.android.anysoftkeyboard.AnyApplication; import com.menny.android.anysoftkeyboard.BuildConfig; -import com.menny.android.anysoftkeyboard.FeaturesSet; import com.menny.android.anysoftkeyboard.R; import java.util.ArrayList; @@ -2372,12 +2371,9 @@ public abstract class AnySoftKeyboard extends InputMethodService implements && !mSuggest.isValidWord(suggestion)// this is for the case that the word was auto-added upon picking && !mSuggest.isValidWord(suggestion.toString().toLowerCase(getCurrentKeyboard().getLocale())); - if (!mJustAutoAddedWord) { - if (showingAddToDictionaryHint && mCandidateView != null) { - mCandidateView.showAddToDictionaryHint(suggestion); - } - } - if (!TextUtils.isEmpty(mCommittedWord)) { + if (showingAddToDictionaryHint && mCandidateView != null) { + mCandidateView.showAddToDictionaryHint(suggestion); + } else if (!TextUtils.isEmpty(mCommittedWord)) {//if we showingAddToDictionaryHint, we most likely do not have a next-word suggestion! The committed word is not in the dictionary) setSuggestions(mSuggest.getNextSuggestions(mCommittedWord, mWord.isAllUpperCase()), false, false, false); mWord.setFirstCharCapitalized(false); } -- cgit v1.2.3