2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-17 15:26:23 +00:00

[fenix] Fix breaking APIs in SearchUseCases

This commit is contained in:
Jonathan Almeida 2023-02-08 16:06:38 -05:00 committed by mergify[bot]
parent 5533f1c818
commit 31a748ac6c

View File

@ -994,14 +994,17 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}
} else {
if (newTab) {
components.useCases.searchUseCases.newTabSearch
.invoke(
searchTermOrURL,
SessionState.Source.Internal.UserEntered,
true,
mode.isPrivate,
searchEngine = engine,
)
val searchUseCase = if (mode.isPrivate) {
components.useCases.searchUseCases.newPrivateTabSearch
} else {
components.useCases.searchUseCases.newTabSearch
}
searchUseCase.invoke(
searchTermOrURL,
SessionState.Source.Internal.UserEntered,
true,
searchEngine = engine,
)
} else {
components.useCases.searchUseCases.defaultSearch.invoke(searchTermOrURL, engine)
}