mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-08 01:55:59 +00:00
revert biometricAuth
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user