Restore just launched checker.

This commit is contained in:
Max Goedjen 2020-09-10 23:35:52 -07:00
parent 915f0f9075
commit 848b8968fc
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8
2 changed files with 5 additions and 5 deletions

View File

@ -35,6 +35,10 @@ struct AppDelegate: App {
if !hasRunSetup { if !hasRunSetup {
showingSetup = true showingSetup = true
} }
if agentStatusChecker.running && justUpdatedChecker.justUpdated {
_ = LaunchAgentController().install()
}
} }
} }
.commands { .commands {

View File

@ -4,12 +4,8 @@ import ServiceManagement
struct LaunchAgentController { struct LaunchAgentController {
func install() -> Bool { func install() -> Bool {
setEnabled(true)
}
func relaunch() {
_ = setEnabled(false) _ = setEnabled(false)
_ = setEnabled(true) return setEnabled(true)
} }
private func setEnabled(_ enabled: Bool) -> Bool { private func setEnabled(_ enabled: Bool) -> Bool {