Digital PCT265 defect PRODDEF-28200 - Prevent navigation to the same controller fixing hang ups.
This commit is contained in:
parent
58f7abb5fc
commit
f7a348a8b0
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user