Log a debug message only when it’s first run.

This commit is contained in:
Brent Simmons 2017-11-25 16:10:19 -08:00
parent 7b964e05f9
commit 61c429d45c
1 changed files with 7 additions and 1 deletions

View File

@ -72,6 +72,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
func logDebugMessage(_ message: String) {
#if DEBUG
print("logDebugMessage: \(message)")
#endif
logMessage(message, type: .debug)
}
@ -116,7 +120,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
appName = Bundle.main.infoDictionary!["CFBundleExecutable"]! as! String
let isFirstRun = AppDefaults.shared.isFirstRun
logDebugMessage(isFirstRun ? "Is first run." : "Is not first run.")
if isFirstRun {
logDebugMessage("Is first run.")
}
let localAccount = AccountManager.shared.localAccount
DefaultFeedsImporter.importIfNeeded(isFirstRun, account: localAccount)