Prechádzať zdrojové kódy

Merge pull request #656 from deltachat/no-chatlist-flash2

avoid flashing up the welcome-screen between login-view and chatlist
bjoern 5 rokov pred
rodič
commit
0bb35d48bd

+ 2 - 10
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -178,25 +178,17 @@ extension AppCoordinator: WelcomeCoordinator {
         welcomeController?.present(loginController, animated: true, completion: nil)
     }
 
-    func handleLoginSuccess() {
-        DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
-            self.loginController.dismiss(animated: true) { // this is ignored if loginController is not shown
-                self.presentTabBarController()
-            }
-        }
-    }
-
     func handleQRAccountCreationSuccess() {
         let profileInfoController = ProfileInfoViewController(context: dcContext)
         let profileInfoNav = UINavigationController(rootViewController: profileInfoController)
         profileInfoNav.modalPresentationStyle = .fullScreen
         let coordinator = EditSettingsCoordinator(dcContext: dcContext, navigationController: profileInfoNav)
         profileInfoController.coordinator = coordinator
-        profileInfoController.onClose = handleProfileInfoClosed
+        profileInfoController.onClose = handleLoginSuccess
         welcomeController?.present(profileInfoNav, animated: true, completion: nil)
     }
 
-    private func handleProfileInfoClosed() {
+    func handleLoginSuccess() {
         presentTabBarController()
     }