Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Classes/View Controllers/SplitViewControllerDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down