Fix bug where agent could relaunch after being disabled (#743)

This commit is contained in:
Max Goedjen
2025-10-07 20:54:38 -07:00
committed by GitHub
parent f13bc23991
commit 275b6ef9bb
3 changed files with 7 additions and 2 deletions

View File

@@ -17,7 +17,8 @@ struct Secretive: App {
.onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in
Task {
@AppStorage("defaultsHasRunSetup") var hasRunSetup = false
guard hasRunSetup else { return }
@AppStorage("explicitlyDisabled") var explicitlyDisabled = false
guard hasRunSetup && !explicitlyDisabled else { return }
agentLaunchController.check()
guard !agentLaunchController.developmentBuild else { return }
if justUpdatedChecker.justUpdatedBuild || !agentLaunchController.running {