Parcourir la source

fix opening shared chats

B. Petersen il y a 5 ans
Parent
commit
13ecc4eb84
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  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) {