Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ class KeyboardAnimationCallback(

if (isKeyboardFullyVisible && !isKeyboardSizeEqual && !isResizeHandledInCallbackMethods) {
Logger.i(TAG, "onApplyWindowInsets: ${this.persistentKeyboardHeight} -> $keyboardHeight")
layoutObserver?.syncUpLayout()
this.onKeyboardResized(keyboardHeight)

return insets
Expand Down Expand Up @@ -217,8 +216,6 @@ class KeyboardAnimationCallback(
this.persistentKeyboardHeight = keyboardHeight
}

layoutObserver?.syncUpLayout()

// keyboard gets resized - we do not want to have a default animated transition
// so we skip these animations
val isKeyboardResized = keyboardHeight != 0.0 && prevKeyboardHeight != keyboardHeight
Expand Down Expand Up @@ -427,6 +424,8 @@ class KeyboardAnimationCallback(
private fun onKeyboardResized(keyboardHeight: Double) {
duration = 0

layoutObserver?.syncUpLayout()

context.emitEvent("KeyboardController::keyboardWillShow", getEventParams(keyboardHeight))
listOf(
KeyboardTransitionEvent.Start,
Expand Down Expand Up @@ -477,6 +476,7 @@ class KeyboardAnimationCallback(
val event = pendingStartEvent ?: return

pendingStartEvent = null
layoutObserver?.syncUpLayout()
context.dispatchEvent(
eventPropagationView.id,
KeyboardTransitionEvent(
Expand Down
Loading