Bladeren bron

always pop tab ViewControllers to their root VC after a new account setup

cyberta 5 jaren geleden
bovenliggende
commit
c5e61a009b

+ 1 - 0
deltachat-ios/Controller/WelcomeViewController.swift

@@ -21,6 +21,7 @@ class WelcomeViewController: UIViewController, ProgressAlertHandler {
                 [weak self] in
                 if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
                     appDelegate.appCoordinator.presentTabBarController()
+                    appDelegate.appCoordinator.popTabsToRootViewControllers()
                 }
             }
             self.navigationController?.pushViewController(accountSetupController, animated: true)

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

@@ -116,4 +116,10 @@ class AppCoordinator {
         showTab(index: chatsTab)
         window.makeKeyAndVisible()
     }
+
+    func popTabsToRootViewControllers() {
+        qrNavController.popToRootViewController(animated: false)
+        chatsNavController.popToRootViewController(animated: false)
+        settingsNavController.popToRootViewController(animated: false)
+    }
 }