|
@@ -45,6 +45,8 @@ class KMCloseVerificationWC: NSWindowController {
|
|
|
|
|
|
nextButton.isEnabled = false
|
|
|
|
|
|
+ window?.delegate = self
|
|
|
+
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(changeEffectiveAppearance), name: NSNotification.Name(rawValue: "kEffectiveAppearance"), object: nil)
|
|
|
}
|
|
|
|
|
@@ -210,3 +212,11 @@ extension KMCloseVerificationWC: NSTextFieldDelegate {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+extension KMCloseVerificationWC: NSWindowDelegate {
|
|
|
+ func windowWillClose(_ notification: Notification) {
|
|
|
+ if let data = self.window?.isEqual(to: notification.object), data {
|
|
|
+ verifficationTextField.stringValue = ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|