mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: hook up proper data events
This commit is contained in:
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ struct ConfigurationErrorsView: View {
|
||||
@Published var errors: [String] = []
|
||||
}
|
||||
|
||||
var model: Model
|
||||
@ObservedObject var model: Model
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
|
Reference in New Issue
Block a user