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,10 +251,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||
refreshTimer!.update()
|
||||
syncTimer!.update()
|
||||
#else
|
||||
if AppDefaults.shared.suppressSyncOnLaunch {
|
||||
refreshTimer!.update()
|
||||
syncTimer!.update()
|
||||
} else {
|
||||
DispatchQueue.main.async {
|
||||
self.refreshTimer!.timedRefresh(nil)
|
||||
self.syncTimer!.timedRefresh(nil)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if AppDefaults.shared.showDebugMenu {
|
||||
|
|
Loading…
Reference in New Issue