Check on foreground

This commit is contained in:
Max Goedjen 2020-03-15 14:34:45 -07:00
parent f9771f5b76
commit c6d8df3608
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8
1 changed files with 4 additions and 1 deletions

View File

@ -17,7 +17,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
let agentStatusChecker = AgentStatusChecker()
func applicationDidFinishLaunching(_ aNotification: Notification) {
let contentView = ContentView(storeList: storeList, updater: updater, agentStatusChecker: agentStatusChecker, runSetupBlock: { self.runSetup(sender: nil) })
// Create the window and set the content view.
window = NSWindow(
@ -39,6 +38,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
runSetupIfNeeded()
}
func applicationDidBecomeActive(_ notification: Notification) {
agentStatusChecker.check()
}
@IBAction func add(sender: AnyObject?) {
var addWindow: NSWindow!
let addView = CreateSecretView(store: storeList.modifiableStore!) {