Digital PCT265 defect PRODDEF-28200 - Prevent navigation to the same controller fixing hang ups.

This commit is contained in:
Hedden, Kyle Matthew 2024-04-23 19:02:05 -04:00
parent 58f7abb5fc
commit f7a348a8b0

View File

@ -110,7 +110,8 @@ open class NavigationOperation: MVMCoreOperation, UINavigationControllerDelegate
*/ */
@MainActor @MainActor
open func set(viewControllers: [UIViewController], navigationController: UINavigationController, animated: Bool) { open func set(viewControllers: [UIViewController], navigationController: UINavigationController, animated: Bool) {
guard viewControllers.count > 0 else { guard viewControllers.count > 0,
navigationController.viewControllers != viewControllers else { // If the controller stack is the same, iOS will not call the delegate method of the change, causing the operation to hang.
markAsFinished() markAsFinished()
return return
} }