Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fix voice search button visibility (#2730)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored Feb 3, 2020
1 parent 953feb1 commit ade4895
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ private void initialize(Context aContext) {

mBinding.urlEditText.setOnFocusChangeListener((view, focused) -> {
boolean isUrlEmpty = mBinding.urlEditText.getText().length() == 0;
mViewModel.setIsMicrophoneEnabled(!focused || isUrlEmpty);
mViewModel.setIsFocused(focused);
mViewModel.setIsUrlEmpty(isUrlEmpty);
if (!focused) {
Expand Down Expand Up @@ -381,7 +380,6 @@ public void handleURLEdit(String text) {
}
}

mViewModel.setIsMicrophoneEnabled(!text.isEmpty());
clearFocus();
}

Expand Down Expand Up @@ -435,7 +433,6 @@ public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
String aURL = mBinding.urlEditText.getText().toString();
boolean empty = aURL.length() == 0 || aURL.startsWith("about://");
mViewModel.setIsUrlEmpty(empty);
mViewModel.setIsMicrophoneEnabled(empty);
}

@Override
Expand Down

0 comments on commit ade4895

Please sign in to comment.