Explorar o código

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

cyberta %!s(int64=4) %!d(string=hai) anos
pai
achega
cce59d47ff
Modificáronse 1 ficheiros con 5 adicións e 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) {