Explorar o código

Merge pull request #1259 from deltachat/no_double_scrolling

early return on keyboardWillChangeFrameNotification
cyBerta %!s(int64=4) %!d(string=hai) anos
pai
achega
b596e1297b
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      deltachat-ios/Chat/Views/ChatInputBar.swift

+ 3 - 0
deltachat-ios/Chat/Views/ChatInputBar.swift

@@ -83,6 +83,9 @@ public class ChatInputBar: InputBarAccessoryView {
     @objc func keyboardChanged(_ notification: Notification) {
         if let keyboardFrame: NSValue = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue {
             let keyboardRectangle = keyboardFrame.cgRectValue
+            if (keyboardRectangle.height - intrinsicContentSize.height) == keyboardHeight {
+                return
+            }
             invalidateIntrinsicContentSize()
             keyboardHeight = keyboardRectangle.height - intrinsicContentSize.height
             updateTextViewHeight()