From c6d8df3608f34b3fe3d803d16fb0c9edf4e31bbb Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Sun, 15 Mar 2020 14:34:45 -0700 Subject: [PATCH] Check on foreground --- Secretive/AppDelegate.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Secretive/AppDelegate.swift b/Secretive/AppDelegate.swift index 04ec3fe..b40feac 100644 --- a/Secretive/AppDelegate.swift +++ b/Secretive/AppDelegate.swift @@ -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!) {