mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-24 16:51:19 +01:00
Add hidden preference to suppress syncing on launch. Fixes #894
This commit is contained in:
parent
72eacb73b6
commit
f26e0b8c81
@ -44,6 +44,7 @@ final class AppDefaults {
|
||||
static let timelineShowsSeparators = "CorreiaSeparators"
|
||||
static let showTitleOnMainWindow = "KafasisTitleMode"
|
||||
static let feedDoubleClickMarkAsRead = "GruberFeedDoubleClickMarkAsRead"
|
||||
static let suppressSyncOnLaunch = "DevroeSuppressSyncOnLaunch"
|
||||
|
||||
#if !MAC_APP_STORE
|
||||
static let webInspectorEnabled = "WebInspectorEnabled"
|
||||
@ -203,6 +204,15 @@ final class AppDefaults {
|
||||
}
|
||||
}
|
||||
|
||||
var suppressSyncOnLaunch: Bool {
|
||||
get {
|
||||
return AppDefaults.bool(for: Key.suppressSyncOnLaunch)
|
||||
}
|
||||
set {
|
||||
AppDefaults.setBool(for: Key.suppressSyncOnLaunch, newValue)
|
||||
}
|
||||
}
|
||||
|
||||
#if !MAC_APP_STORE
|
||||
var webInspectorEnabled: Bool {
|
||||
get {
|
||||
|
@ -251,9 +251,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||
refreshTimer!.update()
|
||||
syncTimer!.update()
|
||||
#else
|
||||
DispatchQueue.main.async {
|
||||
self.refreshTimer!.timedRefresh(nil)
|
||||
self.syncTimer!.timedRefresh(nil)
|
||||
if AppDefaults.shared.suppressSyncOnLaunch {
|
||||
refreshTimer!.update()
|
||||
syncTimer!.update()
|
||||
} else {
|
||||
DispatchQueue.main.async {
|
||||
self.refreshTimer!.timedRefresh(nil)
|
||||
self.syncTimer!.timedRefresh(nil)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user