diff --git a/Frameworks/Feed/Bundle/Sources/Coordinators/FeedListCoordinator.swift b/Frameworks/Feed/Bundle/Sources/Coordinators/FeedListCoordinator.swift index 6c6a162..73a5fca 100644 --- a/Frameworks/Feed/Bundle/Sources/Coordinators/FeedListCoordinator.swift +++ b/Frameworks/Feed/Bundle/Sources/Coordinators/FeedListCoordinator.swift @@ -19,6 +19,13 @@ public final class FeedListCoordinator: Coordinator { // MARK: Properties public var children: [any Coordinator] = [] + lazy var viewController = { + FeedListViewController(.init( + configuration: configuration, + coordination: self + )) + }() + // MARK: Initialisers public init( configuration: FeedListConfiguration, @@ -34,10 +41,7 @@ public final class FeedListCoordinator: Coordinator { onDismiss: Router.OnDismissClosure? = nil ) { router.present( - FeedListViewController(.init( - configuration: configuration, - coordination: self - )), + viewController, animated: animated, onDismiss: onDismiss ) @@ -53,7 +57,7 @@ extension FeedListCoordinator: FeedListCoordination { present( child: FeedItemCoordinator( item: item, - router: router + router: SheetRouter(parentViewController: viewController) ), animated: true )