diff --git a/Classes/View Controllers/SplitViewControllerDelegate.swift b/Classes/View Controllers/SplitViewControllerDelegate.swift index d60e704de..208535732 100644 --- a/Classes/View Controllers/SplitViewControllerDelegate.swift +++ b/Classes/View Controllers/SplitViewControllerDelegate.swift @@ -94,7 +94,10 @@ final class SplitViewControllerDelegate: UISplitViewControllerDelegate { guard let tab = splitViewController.viewControllers.first as? UITabBarController else { return false } - if splitViewController.isCollapsed { + // isCollapsed can be false even when showing a single view controller on iPhone. + // We check viewControllers.count as well to ensure we don't skip showing view controllers on the nav stack that we'd like to. + // https://github.com/GitHawkApp/GitHawk/issues/2450 + if splitViewController.isCollapsed || splitViewController.viewControllers.count == 1 { if let nav = vc as? UINavigationController, let first = nav.viewControllers.first { tab.selectedViewController?.show(first, sender: sender) } else {