Attempt to quit app when launched from complication
This commit is contained in:
@ -2,6 +2,7 @@ import SwiftUI
|
||||
import SwiftData
|
||||
import SFSafeSymbols
|
||||
import CryptoKit
|
||||
import UIKit
|
||||
|
||||
struct ContentView: View {
|
||||
|
||||
@ -40,7 +41,7 @@ struct ContentView: View {
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.fontWeight(.ultraLight)
|
||||
.padding()
|
||||
.onTapGesture(perform: coordinator.startUnlock)
|
||||
.onTapGesture { unlock(quit: true) }
|
||||
if coordinator.isPerformingRequest {
|
||||
ProgressView()
|
||||
.progressViewStyle(CircularProgressViewStyle())
|
||||
@ -58,10 +59,14 @@ struct ContentView: View {
|
||||
guard launched else {
|
||||
return
|
||||
}
|
||||
unlock(quit: true)
|
||||
didLaunchFromComplication = false
|
||||
coordinator.startUnlock()
|
||||
}
|
||||
}
|
||||
|
||||
private func unlock(quit: Bool) {
|
||||
coordinator.startUnlock(quitAfterSuccess: quit)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
Reference in New Issue
Block a user