From 450338c080c5325355931eaba563492ae022c1d5 Mon Sep 17 00:00:00 2001 From: arcarum <134963929+arcarum@users.noreply.github.com> Date: Sat, 30 Dec 2023 16:39:57 +0400 Subject: [PATCH] Minor improvements to the inline autofill (#364) --- .../org/dslul/openboard/inputmethod/latin/LatinIME.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/LatinIME.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/LatinIME.java index 7aaadb60d..8b09cbf61 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/LatinIME.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/LatinIME.java @@ -1353,12 +1353,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen @RequiresApi(api = Build.VERSION_CODES.R) public InlineSuggestionsRequest onCreateInlineSuggestionsRequest(@NonNull Bundle uiExtras) { Log.d(TAG,"onCreateInlineSuggestionsRequest called"); - - // Revert to default behaviour if show_suggestions is disabled - // (Maybe there is a better way to do this) - if(!mSettings.getCurrent().isSuggestionsEnabledPerUserSettings()){ - return null; - } return InlineAutofillUtils.createInlineSuggestionRequest(mDisplayContext); } @@ -1374,7 +1368,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final View inlineSuggestionView = InlineAutofillUtils.createView(inlineSuggestions, mDisplayContext); // "normal" suggestions might be determined in parallel when processing MSG_UPDATE_SUGGESTION_STRIP // so we add a delay to make sure inline suggestions are set only after normal suggestions - new Handler().postDelayed(() -> { + mHandler.postDelayed(() -> { mSuggestionStripView.clear(); mSuggestionStripView.hideToolbarKeys(); mSuggestionStripView.addSuggestionView(inlineSuggestionView);