diff --git a/macos/Sources/Features/Settings/ConfigurationErrorsController.swift b/macos/Sources/Features/Settings/ConfigurationErrorsController.swift index 6e7a809cb..9e4b2a185 100644 --- a/macos/Sources/Features/Settings/ConfigurationErrorsController.swift +++ b/macos/Sources/Features/Settings/ConfigurationErrorsController.swift @@ -20,8 +20,8 @@ class ConfigurationErrorsController: NSWindowController, NSWindowDelegate { shouldCascadeWindows = false if let c = cancellable { c.cancel() } - cancellable = model.objectWillChange.sink { - if (self.model.errors.count == 0) { + cancellable = model.$errors.sink { newValue in + if (newValue.count == 0) { self.window?.close() } } diff --git a/macos/Sources/Features/Settings/ConfigurationErrorsView.swift b/macos/Sources/Features/Settings/ConfigurationErrorsView.swift index 212354597..7d3aa4d83 100644 --- a/macos/Sources/Features/Settings/ConfigurationErrorsView.swift +++ b/macos/Sources/Features/Settings/ConfigurationErrorsView.swift @@ -5,7 +5,7 @@ struct ConfigurationErrorsView: View { @Published var errors: [String] = [] } - var model: Model + @ObservedObject var model: Model var body: some View { VStack {