From 161814134258880d06df4f70fd8407e8bf9b0053 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Tue, 6 Dec 2022 14:25:31 -0500 Subject: [PATCH] Fix view flicker when switching between keyboard and attachment/emoji keyboards. --- .../components/KeyboardAwareLinearLayout.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java b/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java index ebb665665a..b34138ef7e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java @@ -107,10 +107,6 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat { } private void updateKeyboardState() { - updateKeyboardState(Integer.MAX_VALUE); - } - - private void updateKeyboardState(int previousHeight) { if (viewInset == 0 && Build.VERSION.SDK_INT >= 21) viewInset = getViewInset(); getWindowVisibleDisplayFrame(rect); @@ -130,11 +126,7 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat { onKeyboardOpen(keyboardHeight); } } else if (keyboardOpen) { - if (previousHeight == keyboardHeight) { - onKeyboardClose(); - } else { - postDelayed(() -> updateKeyboardState(keyboardHeight), 100); - } + onKeyboardClose(); } }