mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 07:57:01 +00:00
Reuse dismissInput when closing keyboard with a gesture
This commit is contained in:
parent
db4aa60e6e
commit
89da2e7a3d
@ -2021,14 +2021,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
|
||||
if canDismiss, let inputHeight = derivedLayoutState.inputNodeHeight, currentLocation.y + (self.keyboardGestureAccessoryHeight ?? 0.0) > validLayout.size.height - inputHeight {
|
||||
self.upperInputPositionBound = nil
|
||||
self.requestUpdateInterfaceState(.animated(duration: 0.25, curve: .spring), true, { state in
|
||||
if case .none = state.inputMode {
|
||||
return state
|
||||
}
|
||||
return state.updatedInputMode { _ in
|
||||
return .none
|
||||
}
|
||||
})
|
||||
self.dismissInput()
|
||||
} else {
|
||||
self.upperInputPositionBound = nil
|
||||
self.updateLayoutInternal(transition: .animated(duration: 0.25, curve: .spring))
|
||||
|
Loading…
x
Reference in New Issue
Block a user