1
0
Fork 0

For #12430: Hide the mic when not using Google

master
Sawyer Blatz 2020-07-23 11:24:37 -07:00 committed by Emily Kager
parent d3a07e95c9
commit 0e438ef9a7
2 changed files with 242 additions and 236 deletions

View File

@ -160,7 +160,11 @@ class SearchFragment : Fragment(), UserInteractionHandler {
BrowserToolbar.Button(
ContextCompat.getDrawable(requireContext(), R.drawable.ic_microphone)!!,
requireContext().getString(R.string.voice_search_content_description),
visible = { requireContext().settings().shouldShowVoiceSearch && speechIsAvailable() },
visible = {
currentSearchEngine.searchEngine.identifier.contains("google") &&
speechIsAvailable() &&
requireContext().settings().shouldShowVoiceSearch
},
listener = ::launchVoiceSearch
)
)

File diff suppressed because one or more lines are too long