Commit 5f0fe216 authored by Emily Kager's avatar Emily Kager Committed by Colin Lee
Browse files

For #1375 - Suppress history suggestions in awesome bar via setting

parent d4d1e6bd
......@@ -155,9 +155,12 @@ class AwesomeBarUIView(
view.addProviders(searchSuggestionProvider!!)
}
if (Settings.getInstance(container.context).shouldShowVisitedSitesBookmarks) {
view.addProviders(historyStorageProvider!!)
}
view.addProviders(
clipboardSuggestionProvider!!,
historyStorageProvider!!,
sessionProvider!!
)
}
......
......@@ -61,6 +61,12 @@ class Settings private constructor(context: Context) {
false
)
val shouldShowVisitedSitesBookmarks: Boolean
get() = preferences.getBoolean(
appContext.getPreferenceKey(R.string.pref_key_show_visited_sites_bookmarks),
true
)
val shouldUseDarkTheme: Boolean
get() = preferences.getBoolean(
appContext.getPreferenceKey(R.string.pref_key_dark_theme),
......
......@@ -37,7 +37,8 @@
<!-- Search Settings -->
<string name="pref_key_show_search_suggestions" translatable="false">pref_key_show_search_suggestions</string>
<string name = "pref_key_bounce_quick_action" translatable="false">pref_key_bounce_quick_action</string>
<string name="pref_key_bounce_quick_action" translatable="false">pref_key_bounce_quick_action</string>
<string name="pref_key_show_visited_sites_bookmarks" translatable="false">pref_key_show_visited_sites_bookmarks</string>
<!-- Site Permissions Settings -->
<string name="pref_key_optimize" translatable="false">pref_key_optimize</string>
<string name="pref_key_show_site_exceptions" translatable="false">pref_key_show_site_exceptions</string>
......
......@@ -89,6 +89,8 @@
<string name="preferences_category_about">About</string>
<!-- Preference for settings related to changing the default search engine -->
<string name="preferences_search_engine">Search engine</string>
<!-- Preference for showing visited sites and bookmarks in awesomebar -->
<string name="preference_show_visited_sites_bookmarks">Show visited sites and bookmarks</string>
<!-- Preference linking to help about Fenix -->
<string name="preferences_help">Help</string>
<!-- Preference link to rating Fenix on the Play Store -->
......
......@@ -11,4 +11,9 @@
android:key="@string/pref_key_show_search_suggestions"
android:title="@string/preferences_show_search_suggestions"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="true"
android:key="@string/pref_key_show_visited_sites_bookmarks"
android:title='@string/preference_show_visited_sites_bookmarks'
app:iconSpaceReserved="false" />
</PreferenceScreen>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment