Skip to content

Commit f20c965

Browse files
committed
fixup
1 parent 7fb6732 commit f20c965

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Coder-Desktop/Coder-Desktop/UpdaterService.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ final class UpdaterService: NSObject, ObservableObject {
1010
private var updater: SPUUpdater!
1111
@Published var canCheckForUpdates = true
1212

13-
@Published var autoCheckForUpdates: Bool = false {
13+
@Published var autoCheckForUpdates: Bool! {
1414
didSet {
15-
if autoCheckForUpdates != oldValue {
15+
if let autoCheckForUpdates, autoCheckForUpdates != oldValue {
1616
updater.automaticallyChecksForUpdates = autoCheckForUpdates
1717
}
1818
}
@@ -31,6 +31,7 @@ final class UpdaterService: NSObject, ObservableObject {
3131
.flatMap { UpdateChannel(rawValue: $0) } ?? .stable
3232
super.init()
3333
updater = inner.updater
34+
autoCheckForUpdates = updater.automaticallyChecksForUpdates
3435
updater.publisher(for: \.canCheckForUpdates).assign(to: &$canCheckForUpdates)
3536
}
3637

0 commit comments

Comments
 (0)