Remove a few prints, add some whitespace.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts 2018-10-02 22:36:39 +02:00
parent bc279b1e79
commit 12e33681c1
4 changed files with 2 additions and 15 deletions

View File

@ -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 {

View File

@ -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)

View File

@ -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)
}
}
}
}