mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 11:20:47 +01:00
Fix back button behavior on OnePlus phones.
Couple things happened: - Core issue: The device always thought the keyboard was open, so it was always trying to dismiss the keyboard when you pressed back (instead of actually going back) - Big fix: Increase the tolerance of our view height differentialt that detects if the keyboard is open - Other fix: the getViewInset() method is always missing on Q, so as a temp fix we fall back to the status bar height. Gets the calculation to be closer, even if not truly correct.
This commit is contained in:
@@ -979,9 +979,13 @@ public class ConversationActivity extends PassphraseRequiredActivity
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
Log.d(TAG, "onBackPressed()");
|
||||
if (reactionOverlay.isShowing()) reactionOverlay.hide();
|
||||
else if (container.isInputOpen()) container.hideCurrentInput(composeText);
|
||||
else super.onBackPressed();
|
||||
if (reactionOverlay.isShowing()) {
|
||||
reactionOverlay.hide();
|
||||
} else if (container.isInputOpen()) {
|
||||
container.hideCurrentInput(composeText);
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user