From 9f758861d9366fca5dbfe3565fae4ccaa0ff2160 Mon Sep 17 00:00:00 2001 From: "David v.Knobelsdorff" Date: Tue, 26 Nov 2024 12:13:22 +0100 Subject: [PATCH] fix push navigation in modally presented coordinator --- Atlas/Atlas/Coordinators/MVVMCCoordinator.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Atlas/Atlas/Coordinators/MVVMCCoordinator.swift b/Atlas/Atlas/Coordinators/MVVMCCoordinator.swift index 3b4a951..f08bdeb 100644 --- a/Atlas/Atlas/Coordinators/MVVMCCoordinator.swift +++ b/Atlas/Atlas/Coordinators/MVVMCCoordinator.swift @@ -38,7 +38,8 @@ extension MVVMCCoordinator { case .modal(let animated): navigationController.topMostViewController.present(view, animated: skipAnimation ? false : animated) case .push(let animated): - navigationController.pushViewController(view, animated: skipAnimation ? false : animated) + (navigationController.topMostViewController.navigationController ?? navigationController) + .pushViewController(view, animated: skipAnimation ? false : animated) } } }