Change to not show alert dialog on automatic refreshes. Issue #729

This commit is contained in:
Maurice Parker 2019-06-10 15:21:17 -05:00
parent c30c7d6f8d
commit e8199ed0a6
2 changed files with 8 additions and 1 deletions

View File

@ -8,11 +8,18 @@
import AppKit
import Account
import os.log
struct ErrorHandler {
private static var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "Account")
public static func present(_ error: Error) {
NSApplication.shared.presentError(error)
}
public static func log(_ error: Error) {
os_log(.error, log: self.log, "%@", error.localizedDescription)
}
}

View File

@ -73,7 +73,7 @@ class AccountRefreshTimer {
lastTimedRefresh = Date()
update()
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.present)
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log)
}