Only update the timer when the refreshInterval changes
This commit is contained in:
parent
064463e892
commit
e62cb4847b
|
@ -49,6 +49,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||||
|
|
||||||
var refreshTimer: AccountRefreshTimer?
|
var refreshTimer: AccountRefreshTimer?
|
||||||
var syncTimer: ArticleStatusSyncTimer?
|
var syncTimer: ArticleStatusSyncTimer?
|
||||||
|
var lastRefreshInterval = AppDefaults.shared.refreshInterval
|
||||||
|
|
||||||
var shuttingDown = false {
|
var shuttingDown = false {
|
||||||
didSet {
|
didSet {
|
||||||
|
@ -350,7 +351,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||||
@objc func userDefaultsDidChange(_ note: Notification) {
|
@objc func userDefaultsDidChange(_ note: Notification) {
|
||||||
updateSortMenuItems()
|
updateSortMenuItems()
|
||||||
updateGroupByFeedMenuItem()
|
updateGroupByFeedMenuItem()
|
||||||
refreshTimer?.update()
|
|
||||||
|
if lastRefreshInterval != AppDefaults.shared.refreshInterval {
|
||||||
|
refreshTimer?.update()
|
||||||
|
lastRefreshInterval = AppDefaults.shared.refreshInterval
|
||||||
|
}
|
||||||
|
|
||||||
updateDockBadge()
|
updateDockBadge()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue