No issue: clarify naming for showing a prompt to allow search suggestions (#7870)
parent
a39a9e5b4e
commit
44e4d8e12c
|
@ -86,7 +86,7 @@ class DefaultSearchController(
|
|||
)
|
||||
)
|
||||
store.dispatch(
|
||||
SearchFragmentAction.ShowSearchSuggestionsHint(
|
||||
SearchFragmentAction.AllowSearchSuggestionsInPrivateModePrompt(
|
||||
text.isNotEmpty() &&
|
||||
(context as HomeActivity).browsingModeManager.mode.isPrivate &&
|
||||
!context.settings().shouldShowSearchSuggestionsInPrivate &&
|
||||
|
|
|
@ -70,7 +70,7 @@ sealed class SearchFragmentAction : Action {
|
|||
data class SearchShortcutEngineSelected(val engine: SearchEngine) : SearchFragmentAction()
|
||||
data class SelectNewDefaultSearchEngine(val engine: SearchEngine) : SearchFragmentAction()
|
||||
data class ShowSearchShortcutEnginePicker(val show: Boolean) : SearchFragmentAction()
|
||||
data class ShowSearchSuggestionsHint(val show: Boolean) : SearchFragmentAction()
|
||||
data class AllowSearchSuggestionsInPrivateModePrompt(val show: Boolean) : SearchFragmentAction()
|
||||
data class UpdateQuery(val query: String) : SearchFragmentAction()
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ private fun searchStateReducer(state: SearchFragmentState, action: SearchFragmen
|
|||
state.copy(
|
||||
searchEngineSource = SearchEngineSource.Default(action.engine)
|
||||
)
|
||||
is SearchFragmentAction.ShowSearchSuggestionsHint ->
|
||||
is SearchFragmentAction.AllowSearchSuggestionsInPrivateModePrompt ->
|
||||
state.copy(showSearchSuggestionsHint = action.show)
|
||||
is SearchFragmentAction.UpdateEditingCanceled ->
|
||||
state.copy(isAnimatingOut = true)
|
||||
|
|
|
@ -123,7 +123,7 @@ class SearchInteractorTest {
|
|||
interactor.onTextChanged("test")
|
||||
|
||||
verify { store.dispatch(SearchFragmentAction.UpdateQuery("test")) }
|
||||
verify { store.dispatch(SearchFragmentAction.ShowSearchSuggestionsHint(false)) }
|
||||
verify { store.dispatch(SearchFragmentAction.AllowSearchSuggestionsInPrivateModePrompt(false)) }
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue