소스 검색

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