Fix macOS toggle style

This commit is contained in:
世界
2024-09-16 14:22:36 +08:00
parent 66a33e3398
commit a8ea162606
6 changed files with 77 additions and 131 deletions
@@ -75,10 +75,9 @@
private func reset() {
selected = false
profiles = nil
if let connection = connection {
if let connection {
connection.cancel()
self.connection = nil
}
}
@@ -87,7 +86,7 @@
self.connection = NWSocket(connection)
connection.stateUpdateHandler = { state in
switch state {
case .failed(let error):
case let .failed(error):
DispatchQueue.main.async { [self] in
reset()
alert = Alert(error)