diff --git a/Source/Modules/AppDelegate.swift b/Source/Modules/AppDelegate.swift index 93702611..40cbc575 100644 --- a/Source/Modules/AppDelegate.swift +++ b/Source/Modules/AppDelegate.swift @@ -74,7 +74,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega mgrPrefs.setMissingDefaults() // 只要使用者沒有勾選檢查更新、沒有主動做出要檢查更新的操作,就不要檢查更新。 - if UserDefaults.standard.object(forKey: VersionUpdateApi.kCheckUpdateAutomatically) != nil { + if mgrPrefs.checkUpdateAutomatically { checkForUpdate() } } @@ -113,7 +113,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega // time for update? if !forced { - if UserDefaults.standard.bool(forKey: VersionUpdateApi.kCheckUpdateAutomatically) == false { + if !mgrPrefs.checkUpdateAutomatically { return } let now = Date()