Skip to content

Commit

Permalink
reload the login window when wifi is connected
Browse files Browse the repository at this point in the history
  • Loading branch information
Clkw0rk committed Nov 7, 2023
1 parent 201aa0b commit 64b6876
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion XCredsLoginPlugIn/WifiWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class WifiWindowController: NSWindowController, WifiManagerDelegate, NSMenuDeleg
let wifiLog = "wifiLog"
private var defaultFadeDuration: TimeInterval = 0.1
private var completionHandler: (() -> Void)?
var delegate: XCredsMechanismProtocol?
let wifiManager = WifiManager()

@IBAction func wifiCredentialCancelButtonPressed(_ sender: NSButton) {
Expand Down Expand Up @@ -156,6 +157,8 @@ class WifiWindowController: NSWindowController, WifiManagerDelegate, NSMenuDeleg
@IBAction func dismissButton(_ sender: Any) {
TCSLogWithMark("closing window")
DispatchQueue.main.async {
TCSLogWithMark("Triggering login window reload")
self.delegate?.reload()
self.window?.close()
}
}
Expand Down Expand Up @@ -286,7 +289,7 @@ class WifiWindowController: NSWindowController, WifiManagerDelegate, NSMenuDeleg
}

func wifiManagerConnectedToNetwork() {
TCSLogWithMark("dismissing")
TCSLogWithMark("WiFi successfully connected leaving manager")
self.dismissButton(self)
}
}

0 comments on commit 64b6876

Please sign in to comment.