Explorar el Código

fix disappearing and reappearing of the message input bar on scroll down in a chat

cyberta hace 4 años
padre
commit
cce59d47ff
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      deltachat-ios/Chat/ChatViewController.swift

+ 5 - 1
deltachat-ios/Chat/ChatViewController.swift

@@ -169,7 +169,11 @@ class ChatViewController: UITableViewController {
     }
 
     @objc func keyboardDidShow(_ notification: Notification) {
-        isKeyboardShown = true
+        if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue {
+            if keyboardSize.height > tableView.inputAccessoryView?.frame.height ?? 0 {
+                isKeyboardShown = true
+            }
+        }
     }
 
     @objc func keyboardWillShow(_ notification: Notification) {