revert biometricAuth

This commit is contained in:
Levitating Pineapple
2024-10-16 16:30:52 +03:00
parent d90dfc3d5a
commit e7bf175dfc
2 changed files with 1 additions and 4 deletions

View File

@@ -10,11 +10,10 @@ import SwiftUI
class AppSheetState: ObservableObject {
static let shared = AppSheetState()
@Published var biometricAuth: Bool = false
@Published var scenePhaseActive: Bool = false
func redactionReasons(_ protectScreen: Bool) -> RedactionReasons {
!protectScreen || scenePhaseActive || biometricAuth
!protectScreen || scenePhaseActive
? RedactionReasons()
: RedactionReasons.placeholder
}

View File

@@ -63,11 +63,9 @@ func systemAuthenticate(_ reason: String, _ completed: @escaping (LAResult) -> V
var authAvailabilityError: NSError?
if laContext.canEvaluatePolicy(.deviceOwnerAuthentication, error: &authAvailabilityError) {
logger.debug("DEBUGGING: systemAuthenticate: canEvaluatePolicy callback")
AppSheetState.shared.biometricAuth = true
laContext.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason) { success, authError in
logger.debug("DEBUGGING: systemAuthenticate evaluatePolicy callback")
DispatchQueue.main.async {
AppSheetState.shared.biometricAuth = false
if success {
completed(LAResult.success)
} else {