Skip to content

Commit

Permalink
Fix view flicker when switching between keyboard and attachment/emoji…
Browse files Browse the repository at this point in the history
… keyboards.
  • Loading branch information
cody-signal committed Dec 7, 2022
1 parent d7fb05f commit 1618141
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ private void updateRotation() {
}

private void updateKeyboardState() {
updateKeyboardState(Integer.MAX_VALUE);
}

private void updateKeyboardState(int previousHeight) {
if (viewInset == 0 && Build.VERSION.SDK_INT >= 21) viewInset = getViewInset();

getWindowVisibleDisplayFrame(rect);
Expand All @@ -130,11 +126,7 @@ private void updateKeyboardState(int previousHeight) {
onKeyboardOpen(keyboardHeight);
}
} else if (keyboardOpen) {
if (previousHeight == keyboardHeight) {
onKeyboardClose();
} else {
postDelayed(() -> updateKeyboardState(keyboardHeight), 100);
}
onKeyboardClose();
}
}

Expand Down

0 comments on commit 1618141

Please sign in to comment.