Procházet zdrojové kódy

fix opening shared chats

B. Petersen před 5 roky
rodič
revize
13ecc4eb84

+ 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) {