Skip to content

Commit

Permalink
Fix bug where rx audio indicator was still visible even in the collap…
Browse files Browse the repository at this point in the history
…sed version of the text chat view, when the frequency is hidden. Addresses issue #102.
  • Loading branch information
VanceVagell committed Dec 3, 2024
1 parent cb20bec commit b4ba69a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
final View rootView = findViewById(android.R.id.content);
final View frequencyView = findViewById(R.id.frequencyContainer);
final EditText activeFrequencyEditText = findViewById(R.id.activeFrequency);
final View rxAudioCircleView = findViewById(R.id.rxAudioCircle);

// Track if keyboard is likely visible (and/or screen got short for some reason), so we can
// make room for critical UI components that must be visible.
Expand Down Expand Up @@ -1033,9 +1034,11 @@ public void onGlobalLayout() {
if (heightDiff > screenHeight * 0.25) { // If more than 25% of the screen height is reduced
// Keyboard is visible, hide the top view
frequencyView.setVisibility(View.GONE);
rxAudioCircleView.setVisibility(View.GONE);
} else {
// Keyboard is hidden, show the top view
frequencyView.setVisibility(View.VISIBLE);
rxAudioCircleView.setVisibility(View.VISIBLE);
}
}
});
Expand Down

0 comments on commit b4ba69a

Please sign in to comment.