Show Organizer on launch (do not collapse)

Makes sure that service.delegate is always set to Organizer on
launch.
This commit is contained in:
Davide De Rosa 2019-10-22 23:33:57 +02:00
parent d550461c60
commit c034a6457c
3 changed files with 8 additions and 2 deletions

View File

@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 1.9.0 Beta 2056 (2019-10-21)
## Unreleased
### Changed
- Upgrade project to Xcode 11.
- Organizer shown on launch rather than profile in use.
### Fixed

View File

@ -88,7 +88,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
// MARK: UISplitViewControllerDelegate
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool {
return !TransientStore.shared.service.hasActiveProfile()
return true//!TransientStore.shared.service.hasActiveProfile()
}
// MARK: URLs

View File

@ -115,6 +115,11 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
reloadModel()
tableView.reloadData()
// XXX: if split vc is collapsed when a profile is in use, this vc
// is not loaded on app launch. consequentially, service.delegate remains
// nil until the Organizer is entered
//
// see UISplitViewControllerDelegate in AppDelegate (collapse is now commented out)
service.delegate = self
NotificationCenter.default.addObserver(self, selector: #selector(vpnDidUpdate), name: .VPNDidChangeStatus, object: nil)