浏览代码

reload message list if app returns from background

cyberta 3 年之前
父节点
当前提交
dead7c2957
共有 1 个文件被更改,包括 4 次插入0 次删除
  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
                         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 {
                     self.updateTitle(chat: dcChat)