From 190c56b68bcf27c0b5947bb86dcd407f0a1c8a91 Mon Sep 17 00:00:00 2001 From: Harry <109690906+harry-signal@users.noreply.github.com> Date: Wed, 9 Nov 2022 11:59:38 -0800 Subject: [PATCH] Fix broken navigation when interactive back swiping on root nav controller --- SignalUI/ViewControllers/OWSNavigationController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SignalUI/ViewControllers/OWSNavigationController.swift b/SignalUI/ViewControllers/OWSNavigationController.swift index df3fb33e1d..9ee68b6098 100644 --- a/SignalUI/ViewControllers/OWSNavigationController.swift +++ b/SignalUI/ViewControllers/OWSNavigationController.swift @@ -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 {