Remove a few prints, add some whitespace.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
bc279b1e79
commit
12e33681c1
|
@ -20,7 +20,6 @@ extension AppCoordinator: TunnelInfoTableViewControllerDelegate {
|
|||
}
|
||||
|
||||
func configure(tunnel: Tunnel, tunnelInfoTableViewController: TunnelInfoTableViewController) {
|
||||
print("configure tunnel \(tunnel)")
|
||||
let editContext = persistentContainer.newBackgroundContext()
|
||||
var backgroundTunnel: Tunnel?
|
||||
editContext.performAndWait {
|
||||
|
|
|
@ -63,14 +63,10 @@ extension AppCoordinator: TunnelsTableViewControllerDelegate {
|
|||
}
|
||||
|
||||
func info(tunnel: Tunnel, tunnelsTableViewController: TunnelsTableViewController) {
|
||||
print("info tunnel \(tunnel)")
|
||||
|
||||
showTunnelInfoViewController(tunnel: tunnel, context: self.persistentContainer.viewContext)
|
||||
}
|
||||
|
||||
func delete(tunnel: Tunnel, tunnelsTableViewController: TunnelsTableViewController) {
|
||||
print("delete tunnel \(tunnel)")
|
||||
|
||||
if let moc = tunnel.managedObjectContext {
|
||||
moc.perform {
|
||||
moc.delete(tunnel)
|
||||
|
|
|
@ -71,8 +71,7 @@ class AppCoordinator: RootViewCoordinator { // swiftlint:disable:this type_body_
|
|||
self.persistentContainer.viewContext.automaticallyMergesChangesFromParent = true
|
||||
self.persistentContainer.loadPersistentStores { [weak self] (_, error) in
|
||||
if let error = error {
|
||||
print("Unable to Load Persistent Store. \(error), \(error.localizedDescription)")
|
||||
|
||||
os_log("Unable to load Persistent Store: %{public}@", log: Log.general, type: .error, error.localizedDescription)
|
||||
} else {
|
||||
DispatchQueue.main.async {
|
||||
//start
|
||||
|
@ -81,13 +80,6 @@ class AppCoordinator: RootViewCoordinator { // swiftlint:disable:this type_body_
|
|||
self?.tunnelsTableViewController.viewContext = self?.persistentContainer.viewContext
|
||||
self?.tunnelsTableViewController.delegate = self
|
||||
self?.navigationController.viewControllers = [tunnelsTableViewController]
|
||||
do {
|
||||
if let context = self?.persistentContainer.viewContext, try Tunnel.countInContext(context) == 0 {
|
||||
print("No tunnels ... yet")
|
||||
}
|
||||
} catch {
|
||||
self?.showError(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue