mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-18 05:22:11 +00:00
Force launch.
This commit is contained in:
parent
0ba2e4107b
commit
043af5cb99
@ -28,13 +28,20 @@ struct Secretive: App {
|
|||||||
.onAppear {
|
.onAppear {
|
||||||
if !hasRunSetup {
|
if !hasRunSetup {
|
||||||
showingSetup = true
|
showingSetup = true
|
||||||
} else if agentStatusChecker.running && justUpdatedChecker.justUpdated {
|
} else {
|
||||||
// Relaunch the agent, since it'll be running from earlier update still
|
if agentStatusChecker.running && justUpdatedChecker.justUpdated {
|
||||||
_ = LaunchAgentController().install()
|
// Relaunch the agent, since it'll be running from earlier update still
|
||||||
|
_ = LaunchAgentController().install()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onReceive(NotificationCenter.default.publisher(for: NSApplication.willBecomeActiveNotification)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: NSApplication.willBecomeActiveNotification)) { _ in
|
||||||
agentStatusChecker.check()
|
agentStatusChecker.check()
|
||||||
|
if hasRunSetup && !agentStatusChecker.running {
|
||||||
|
// We've run setup, we didn't just update, launchd is just not doing it's thing.
|
||||||
|
// Force a launch directly.
|
||||||
|
LaunchAgentController().forceLaunch()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.commands {
|
.commands {
|
||||||
|
Loading…
Reference in New Issue
Block a user