iOS: Should be able to re-show tunnel detail
Fixes a bug introduced in the refactoring in commit 7322fb084087774e8b58e347902f6d7036cbde5c Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
9faf814e8b
commit
5e9780ef8f
|
@ -257,18 +257,16 @@ class TunnelsListTableViewController: UIViewController {
|
||||||
guard let splitViewController = splitViewController else { return }
|
guard let splitViewController = splitViewController else { return }
|
||||||
guard let navController = navigationController else { return }
|
guard let navController = navigationController else { return }
|
||||||
|
|
||||||
if detailDisplayedTunnel != tunnel {
|
let tunnelDetailVC = TunnelDetailTableViewController(tunnelsManager: tunnelsManager,
|
||||||
let tunnelDetailVC = TunnelDetailTableViewController(tunnelsManager: tunnelsManager,
|
tunnel: tunnel)
|
||||||
tunnel: tunnel)
|
let tunnelDetailNC = UINavigationController(rootViewController: tunnelDetailVC)
|
||||||
let tunnelDetailNC = UINavigationController(rootViewController: tunnelDetailVC)
|
tunnelDetailNC.restorationIdentifier = "DetailNC"
|
||||||
tunnelDetailNC.restorationIdentifier = "DetailNC"
|
if splitViewController.isCollapsed && navController.viewControllers.count > 1 {
|
||||||
if splitViewController.isCollapsed && navController.viewControllers.count > 1 {
|
navController.setViewControllers([self, tunnelDetailNC], animated: animated)
|
||||||
navController.setViewControllers([self, tunnelDetailNC], animated: animated)
|
} else {
|
||||||
} else {
|
splitViewController.showDetailViewController(tunnelDetailNC, sender: self, animated: animated)
|
||||||
splitViewController.showDetailViewController(tunnelDetailNC, sender: self, animated: animated)
|
|
||||||
}
|
|
||||||
detailDisplayedTunnel = tunnel
|
|
||||||
}
|
}
|
||||||
|
detailDisplayedTunnel = tunnel
|
||||||
self.presentedViewController?.dismiss(animated: false, completion: nil)
|
self.presentedViewController?.dismiss(animated: false, completion: nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue