Pārlūkot izejas kodu

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

cyberta 4 gadi atpakaļ
vecāks
revīzija
cce59d47ff
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  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) {
     @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) {
     @objc func keyboardWillShow(_ notification: Notification) {