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
|
shouldCascadeWindows = false
|
||||||
|
|
||||||
if let c = cancellable { c.cancel() }
|
if let c = cancellable { c.cancel() }
|
||||||
cancellable = model.objectWillChange.sink {
|
cancellable = model.$errors.sink { newValue in
|
||||||
if (self.model.errors.count == 0) {
|
if (newValue.count == 0) {
|
||||||
self.window?.close()
|
self.window?.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ struct ConfigurationErrorsView: View {
|
|||||||
@Published var errors: [String] = []
|
@Published var errors: [String] = []
|
||||||
}
|
}
|
||||||
|
|
||||||
var model: Model
|
@ObservedObject var model: Model
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
|
Reference in New Issue
Block a user