From 7de561af5d945c441b681d6d5b42f61d1135f4f1 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Wed, 11 Nov 2020 16:16:39 -0800 Subject: [PATCH] Check on foreground --- Secretive/App.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Secretive/App.swift b/Secretive/App.swift index 3ade857..eb4a82a 100644 --- a/Secretive/App.swift +++ b/Secretive/App.swift @@ -33,6 +33,9 @@ struct Secretive: App { _ = LaunchAgentController().install() } } + .onReceive(NotificationCenter.default.publisher(for: NSApplication.willBecomeActiveNotification)) { _ in + agentStatusChecker.check() + } } .commands { CommandGroup(after: CommandGroupPlacement.newItem) {