Fix broken navigation when interactive back swiping on root nav controller

This commit is contained in:
Harry 2022-11-09 11:59:38 -08:00 committed by GitHub
parent 513ba3863d
commit 190c56b68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -218,6 +218,10 @@ extension OWSNavigationController: UIGestureRecognizerDelegate {
public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
owsAssertDebug(gestureRecognizer === self.interactivePopGestureRecognizer)
guard viewControllers.count > 1 else {
return false
}
if let child = topViewController?.getFinalNavigationChildController() {
return !child.shouldCancelNavigationBack
} else {