Przeglądaj źródła

reload message list if app returns from background

cyberta 3 lat temu
rodzic
commit
dead7c2957
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      deltachat-ios/Chat/ChatViewController.swift

+ 4 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -515,6 +515,10 @@ class ChatViewController: UITableViewController {
                         // change might be a deletion
                         // change might be a deletion
                         self.refreshMessages()
                         self.refreshMessages()
                     }
                     }
+                } else {
+                    // notification was resent by system after app was freezed and became active again, userInfo got lost. brrr...
+                    self.loadMessages()
+                    self.scrollToLastUnseenMessage()
                 }
                 }
                 if self.showCustomNavBar {
                 if self.showCustomNavBar {
                     self.updateTitle(chat: dcChat)
                     self.updateTitle(chat: dcChat)