For #15348: Voice search option appears for all search engines

Voice search was restricted only for google, with the condition removed
it should appear now for all search engines
fork
DreVla 1 year ago committed by mergify[bot]
parent 3edc91d13d
commit f38d5c52f3

@ -452,7 +452,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
updateQrButton(it)
}
updateVoiceSearchButton(it)
updateVoiceSearchButton()
}
}
@ -765,15 +765,8 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
searchSelectorAlreadyAdded = true
}
private fun updateVoiceSearchButton(searchFragmentState: SearchFragmentState) {
val searchEngine = searchFragmentState.searchEngineSource.searchEngine
val isVisible =
searchEngine?.id?.contains("google") == true &&
isSpeechAvailable() &&
requireContext().settings().shouldShowVoiceSearch
when (isVisible) {
private fun updateVoiceSearchButton() {
when (isSpeechAvailable() && requireContext().settings().shouldShowVoiceSearch) {
true -> {
if (voiceSearchButtonAction == null) {
voiceSearchButtonAction = IncreasedTapAreaActionDecorator(

Loading…
Cancel
Save