File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,16 +244,20 @@ struct GeneralSettingsView: View {
244244
245245 @StateObject var settings = Settings ( )
246246 @Environment ( \. updateChecker) var updateChecker
247-
247+ @State var automaticallyCheckForUpdate : Bool ?
248+
248249 var body : some View {
249250 Form {
250251 Toggle ( isOn: $settings. quitXPCServiceOnXcodeAndAppQuit) {
251252 Text ( " Quit service when Xcode and host app are terminated " )
252253 }
253254
254255 Toggle ( isOn: . init(
255- get: { updateChecker. automaticallyChecksForUpdates } ,
256- set: { updateChecker. automaticallyChecksForUpdates = $0 }
256+ get: { automaticallyCheckForUpdate ?? updateChecker. automaticallyChecksForUpdates } ,
257+ set: {
258+ updateChecker. automaticallyChecksForUpdates = $0
259+ automaticallyCheckForUpdate = $0
260+ }
257261 ) ) {
258262 Text ( " Automatically Check for Update " )
259263 }
You can’t perform that action at this time.
0 commit comments