diff --git a/app/src/main/java/org/mozilla/fenix/components/Search.kt b/app/src/main/java/org/mozilla/fenix/components/Search.kt index a050e52253..ee2ba93046 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Search.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Search.kt @@ -31,12 +31,11 @@ class Search(private val context: Context) { ).apply { registerForLocaleUpdates(context) GlobalScope.launch { - loadAsync(context).await() + defaultSearchEngine = getDefaultSearchEngineAsync( + context, + Settings.getInstance(context).defaultSearchEngineName + ) } - defaultSearchEngine = getDefaultSearchEngine( - context, - Settings.getInstance(context).defaultSearchEngineName - ) } } } diff --git a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt index 1d36c280db..3fac4cb3f7 100644 --- a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt +++ b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt @@ -152,9 +152,8 @@ class AwesomeBarView( defaultSearchSuggestionProvider = SearchSuggestionProvider( - searchEngine = components.search.searchEngineManager.getDefaultSearchEngine( - this - ), + context = this, + searchEngineManager = components.search.searchEngineManager, searchUseCase = searchUseCase, fetchClient = components.core.client, mode = SearchSuggestionProvider.Mode.MULTIPLE_SUGGESTIONS,