Integrated the SheetRouter router inside the "open(_: )" function for the FeedListCoordinator coordinator in the Feed framework.
This commit is contained in:
parent
558bedb57e
commit
63739cb8cd
@ -19,6 +19,13 @@ public final class FeedListCoordinator: Coordinator {
|
|||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
public var children: [any Coordinator] = []
|
public var children: [any Coordinator] = []
|
||||||
|
|
||||||
|
lazy var viewController = {
|
||||||
|
FeedListViewController(.init(
|
||||||
|
configuration: configuration,
|
||||||
|
coordination: self
|
||||||
|
))
|
||||||
|
}()
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initialisers
|
||||||
public init(
|
public init(
|
||||||
configuration: FeedListConfiguration,
|
configuration: FeedListConfiguration,
|
||||||
@ -34,10 +41,7 @@ public final class FeedListCoordinator: Coordinator {
|
|||||||
onDismiss: Router.OnDismissClosure? = nil
|
onDismiss: Router.OnDismissClosure? = nil
|
||||||
) {
|
) {
|
||||||
router.present(
|
router.present(
|
||||||
FeedListViewController(.init(
|
viewController,
|
||||||
configuration: configuration,
|
|
||||||
coordination: self
|
|
||||||
)),
|
|
||||||
animated: animated,
|
animated: animated,
|
||||||
onDismiss: onDismiss
|
onDismiss: onDismiss
|
||||||
)
|
)
|
||||||
@ -53,7 +57,7 @@ extension FeedListCoordinator: FeedListCoordination {
|
|||||||
present(
|
present(
|
||||||
child: FeedItemCoordinator(
|
child: FeedItemCoordinator(
|
||||||
item: item,
|
item: item,
|
||||||
router: router
|
router: SheetRouter(parentViewController: viewController)
|
||||||
),
|
),
|
||||||
animated: true
|
animated: true
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user