From 25c157ceb02121fd8cb95bfee5f0a5422a919517 Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Wed, 24 Apr 2019 10:05:08 -0700 Subject: [PATCH] No issue: Use setting to show history autocomplete suggestion --- .../mozilla/fenix/components/toolbar/ToolbarIntegration.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt index 6c9c40b8b..0a596d9a3 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt @@ -22,6 +22,7 @@ import org.mozilla.fenix.DefaultThemeManager import org.mozilla.fenix.R import org.mozilla.fenix.browser.BrowserFragmentDirections import org.mozilla.fenix.ext.components +import org.mozilla.fenix.utils.Settings class ToolbarIntegration( context: Context, @@ -87,7 +88,9 @@ class ToolbarIntegration( ToolbarAutocompleteFeature(toolbar).apply { addDomainProvider(domainAutocompleteProvider) - addHistoryStorageProvider(historyStorage) + if (Settings.getInstance(context).shouldShowVisitedSitesBookmarks) { + addHistoryStorageProvider(historyStorage) + } } }