Log a debug message only when it’s first run.
This commit is contained in:
parent
7b964e05f9
commit
61c429d45c
@ -72,6 +72,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||||||
|
|
||||||
func logDebugMessage(_ message: String) {
|
func logDebugMessage(_ message: String) {
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
print("logDebugMessage: \(message)")
|
||||||
|
#endif
|
||||||
|
|
||||||
logMessage(message, type: .debug)
|
logMessage(message, type: .debug)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +120,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||||||
appName = Bundle.main.infoDictionary!["CFBundleExecutable"]! as! String
|
appName = Bundle.main.infoDictionary!["CFBundleExecutable"]! as! String
|
||||||
|
|
||||||
let isFirstRun = AppDefaults.shared.isFirstRun
|
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
|
let localAccount = AccountManager.shared.localAccount
|
||||||
DefaultFeedsImporter.importIfNeeded(isFirstRun, account: localAccount)
|
DefaultFeedsImporter.importIfNeeded(isFirstRun, account: localAccount)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user