浏览代码

fix opening shared chats

B. Petersen 5 年之前
父节点
当前提交
13ecc4eb84
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      deltachat-ios/Controller/ContactDetailViewController.swift

+ 4 - 3
deltachat-ios/Controller/ContactDetailViewController.swift

@@ -278,9 +278,10 @@ class ContactDetailViewController: UITableViewController {
 
     // MARK: - coordinator
     func showChat(chatId: Int) {
-        let chatViewController = ChatViewController(dcContext: viewModel.context, chatId: chatId)
-        navigationController?.popToRootViewController(animated: false)
-        navigationController?.pushViewController(chatViewController, animated: true)
+        if let chatlistViewController = navigationController?.viewControllers[0] {
+            let chatViewController = ChatViewController(dcContext: viewModel.context, chatId: chatId)
+            navigationController?.setViewControllers([chatlistViewController, chatViewController], animated: true)
+        }
     }
 
     func showEditContact(contactId: Int) {