From 6399e0411ee2cdf4795342014cb8ec8b5d40a1cb Mon Sep 17 00:00:00 2001 From: "Subramaniam, Ramya" Date: Wed, 19 Jun 2024 12:49:50 +0530 Subject: [PATCH] Adding additional logging --- .../MVMCore/PresentationHandling/NavigationHandler.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MVMCore/MVMCore/PresentationHandling/NavigationHandler.swift b/MVMCore/MVMCore/PresentationHandling/NavigationHandler.swift index ec27379..480796a 100644 --- a/MVMCore/MVMCore/PresentationHandling/NavigationHandler.swift +++ b/MVMCore/MVMCore/PresentationHandling/NavigationHandler.swift @@ -143,6 +143,9 @@ public class NavigationHandler { - Parameter delegateObject: A delegate object for various delegations. */ public func navigate(with type: NavigationType, tryToReplace: Bool = true, delegateObject: DelegateObject? = nil) async { + + MVMCoreLoggingHandler.logDebugMessage(withDelegate: ": we are in setViewController in MobileFirst:\(String(describing: tryToReplace))") + let operation = await NavigationOperation(with: type, tryToReplace: tryToReplace, delegate: delegateObject?.presentationDelegate) await navigate(with: operation) } @@ -158,7 +161,11 @@ public class NavigationHandler { } public func set(viewControllers: [UIViewController], navigationController: UINavigationController? = nil, delegateObject: DelegateObject? = nil, animated: Bool = true) async { + MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we are in navigation handler setViewController in MVMCore:\(String(describing: viewControllers))") + guard let navigationController = navigationController ?? self.navigationController else { return } + MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we are in navigation handler setViewController - navigationController in MVMCore:\(String(describing: navigationController))") + await NavigationHandler.shared().navigate(with: .set(viewControllers: viewControllers, navigationController: navigationController, animated: animated), delegateObject: delegateObject) }