Просмотр исходного кода

add some more logs so that it is easier to read, when methods start. Also include a log when ChatListController pushes a ChatViewController

cyberta 3 лет назад
Родитель
Сommit
0f90b42225

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

@@ -280,6 +280,7 @@ class ChatViewController: UITableViewController {
 
     override func viewDidLoad() {
         super.viewDidLoad()
+        logger.info("⏰ ChatViewController viewDidLoad start")
         let start = CFAbsoluteTimeGetCurrent()
         tableView.register(TextMessageCell.self, forCellReuseIdentifier: "text")
         tableView.register(ImageTextCell.self, forCellReuseIdentifier: "image")
@@ -368,6 +369,7 @@ class ChatViewController: UITableViewController {
 
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
+        logger.info("⏰ ChatViewController viewWillAppear start")
         let start = CFAbsoluteTimeGetCurrent()
         // this will be removed in viewWillDisappear
         navigationController?.navigationBar.addGestureRecognizer(navBarTap)
@@ -438,6 +440,7 @@ class ChatViewController: UITableViewController {
 
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
+        logger.info("⏰ ChatViewController viewDidAppear start")
         let start = CFAbsoluteTimeGetCurrent()
 
         AppStateRestorer.shared.storeLastActiveChat(chatId: chatId)

+ 1 - 0
deltachat-ios/Controller/ChatListController.swift

@@ -541,6 +541,7 @@ class ChatListController: UITableViewController {
         if searchController.isActive {
             searchController.searchBar.resignFirstResponder()
         }
+        logger.info("⏰ ChatListController showChat")
         let chatVC = ChatViewController(dcContext: dcContext, chatId: chatId, highlightedMsg: highlightedMsg)
         navigationController?.pushViewController(chatVC, animated: animated)
     }