From 5408e2a48e34edccf3e0d610dcd0a367d6fa94fc Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 21 Mar 2024 19:44:30 +0100 Subject: [PATCH] Improved the signature of the functions for the WindowRouter router in the Coordination library. --- Libraries/Coordination/Kit/Sources/Routers/WindowRouter.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Coordination/Kit/Sources/Routers/WindowRouter.swift b/Libraries/Coordination/Kit/Sources/Routers/WindowRouter.swift index 21c7194..8376615 100644 --- a/Libraries/Coordination/Kit/Sources/Routers/WindowRouter.swift +++ b/Libraries/Coordination/Kit/Sources/Routers/WindowRouter.swift @@ -14,7 +14,7 @@ public class WindowRouter: Router { private let window: UIWindow? // MARK: Initialisers - public init(window: UIWindow?) { + public init(_ window: UIWindow?) { self.window = window } @@ -22,7 +22,7 @@ public class WindowRouter: Router { public func present( _ viewController: UIViewController, animated: Bool, - onDismiss: OnDismissClosure? + onDismiss: OnDismissClosure? = nil ) { window?.rootViewController = viewController window?.makeKeyAndVisible()