Browse Source

show archive on click on archive-link

B. Petersen 5 years ago
parent
commit
1ead26c810

+ 1 - 1
deltachat-ios/Controller/ChatListController.swift

@@ -171,7 +171,7 @@ extension ChatListController: UITableViewDataSource, UITableViewDelegate {
         let row = indexPath.row
         if let chatId = chatList?.getChatId(index: row) {
             if chatId==DC_CHAT_ID_ARCHIVED_LINK {
-                // TODO
+                coordinator?.showArchive()
             } else {
                 coordinator?.showChat(chatId: chatId)
             }

+ 8 - 0
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -230,6 +230,14 @@ class ChatListCoordinator: Coordinator {
         chatVC.coordinator = coordinator
         navigationController.pushViewController(chatVC, animated: true)
     }
+
+    func showArchive() {
+        let controller = ChatListController(dcContext: dcContext, showArchive: true)
+        let coordinator = ChatListCoordinator(dcContext: dcContext, navigationController: navigationController)
+        childCoordinators.append(coordinator)
+        controller.coordinator = coordinator
+        navigationController.pushViewController(controller, animated: true)
+    }
 }
 
 class SettingsCoordinator: Coordinator {