1
0
Fork 0

For #6284: Fixes SearchShortcut button functionality when in a session

This makes it so searchShortcuts button works when going from browser -> search
master
Sawyer Blatz 2019-11-06 10:27:57 -08:00
parent 2b955c1a1a
commit 0d5fb67303
1 changed files with 3 additions and 4 deletions

View File

@ -180,14 +180,13 @@ class AwesomeBarView(
fun update(state: SearchFragmentState) {
updateSearchShortcutsIcon(state)
updateSuggestionProvidersVisibility(state)
// Do not make suggestions based on user's current URL
if (state.query == state.session?.url) {
// Do not make suggestions based on user's current URL unless it's a search shortcut
if (state.query == state.session?.url && !state.showSearchShortcuts) {
return
}
updateSuggestionProvidersVisibility(state)
view.onInputChanged(state.query)
}