소스 검색

Merge pull request #676 from deltachat/fix_adding_attachments

fix garbage collection issue leading to inability to add attachments
bjoern 5 년 전
부모
커밋
1760daa22c
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      deltachat-ios/Coordinator/AppCoordinator.swift

+ 4 - 4
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -120,10 +120,10 @@ class AppCoordinator: NSObject, Coordinator {
             assertionFailure("huh? why no nav controller?")
             return
         }
-        let chatVC = ChatViewController(dcContext: dcContext, chatId: chatId)
-        let coordinator = ChatViewCoordinator(dcContext: dcContext, navigationController: navController, chatId: chatId)
-        chatVC.coordinator = coordinator
-        navController.pushViewController(chatVC, animated: animated)
+
+        if let rootController = navController.viewControllers.first as? ChatListController {
+            rootController.coordinator?.showChat(chatId: chatId)
+        }
     }
 
     func handleQRCode(_ code: String) {