From ec8b06e96c4cc0fa4ab29ddffe3291b50802a0a3 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Thu, 30 Jul 2015 18:24:42 -0700 Subject: [PATCH] fix custom input race case fixes #3824 Closes #3851 // FREEBIE --- .../securesms/components/InputAwareLayout.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/InputAwareLayout.java b/src/org/thoughtcrime/securesms/components/InputAwareLayout.java index 9906ffc02b..7fe8a4ca85 100644 --- a/src/org/thoughtcrime/securesms/components/InputAwareLayout.java +++ b/src/org/thoughtcrime/securesms/components/InputAwareLayout.java @@ -33,17 +33,16 @@ public class InputAwareLayout extends KeyboardAwareLinearLayout implements OnKey if (isKeyboardOpen()) { hideSoftkey(imeTarget, new Runnable() { @Override public void run() { + hideAttachedInput(true); input.show(getKeyboardHeight(), true); + current = input; } }); - } else if (current != null && current.isShowing()) { - current.hide(true); - input.show(getKeyboardHeight(), true); } else { - input.show(getKeyboardHeight(), false); + if (current != null) current.hide(true); + input.show(getKeyboardHeight(), current != null); + current = input; } - - current = input; } public InputView getCurrentInput() {