From e5d8e8fe980be99812b4692794cf0d098ccc5d2c Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 2 Jun 2022 01:08:04 +0800 Subject: [PATCH] AppDelegate // Use mgrPrefs.checkUpdateAutomatically. --- Source/Modules/AppDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()