From cc9f142800b164610b52894a1389bebd5958e333 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 7 Sep 2020 15:08:26 +0200 Subject: [PATCH] Dismissing views now animated by default --- ui/BankingiOSApp/BankingiOSApp/persistence/Extensions.swift | 4 ++-- ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/persistence/Extensions.swift b/ui/BankingiOSApp/BankingiOSApp/persistence/Extensions.swift index 1f0cf4df..690b7147 100644 --- a/ui/BankingiOSApp/BankingiOSApp/persistence/Extensions.swift +++ b/ui/BankingiOSApp/BankingiOSApp/persistence/Extensions.swift @@ -54,8 +54,8 @@ extension SceneDelegate { rootNavigationController?.pushViewController(viewController, animated: true) } - static func dismissCurrentView() { - rootNavigationController?.popViewController(animated: false) + static func dismissCurrentView(animated: Bool = true) { + rootNavigationController?.popViewController(animated: animated) } } diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift index 5aa55e6c..43f84104 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift @@ -112,7 +112,7 @@ struct LoginDialog: View { } private func closeDialogAndDispatchLoginResult(_ authenticationSuccess: Bool) { - SceneDelegate.dismissCurrentView() + SceneDelegate.dismissCurrentView(animated: false) self.loginResult(authenticationSuccess) }