Attempt to quit app when launched from complication
This commit is contained in:
@ -58,13 +58,16 @@ final class RequestCoordinator: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
func startUnlock() {
|
||||
func startUnlock(quitAfterSuccess: Bool = false) {
|
||||
guard !isPerformingRequest else {
|
||||
return
|
||||
}
|
||||
isPerformingRequest = true
|
||||
Task {
|
||||
let finalResult = await performFullChallengeResponse()
|
||||
if finalResult == .unlocked, quitAfterSuccess {
|
||||
exit(EXIT_SUCCESS)
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
self.state = finalResult
|
||||
self.isPerformingRequest = false
|
||||
|
Reference in New Issue
Block a user