Terminate immediately on Quit item selection

This commit is contained in:
Ivan Grachyov 2021-06-22 20:10:07 +03:00
parent 5fca7d0b99
commit 74014cf2fc

View File

@ -114,13 +114,9 @@ class Agent: NSObject {
alert.addButton(withTitle: "OK") alert.addButton(withTitle: "OK")
alert.addButton(withTitle: "Cancel") alert.addButton(withTitle: "Cancel")
if alert.runModal() == .alertFirstButtonReturn { if alert.runModal() == .alertFirstButtonReturn {
statusBarItem = nil
WalletConnect.shared.killAllSessions()
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) {
NSApp.terminate(nil) NSApp.terminate(nil)
} }
} }
}
func setupStatusBarItem() { func setupStatusBarItem() {
let statusBar = NSStatusBar.system let statusBar = NSStatusBar.system