feat: Remove unused biometric attempt tracking and auto-biometric launch logic in UnlockScreen
This commit is contained in:
@@ -193,7 +193,6 @@ fun UnlockScreen(
|
||||
var isBiometricEnabled by remember { mutableStateOf(false) }
|
||||
var savedPasswordsMap by remember { mutableStateOf<Map<String, String>>(emptyMap()) }
|
||||
var dataLoaded by remember { mutableStateOf(false) }
|
||||
var biometricAttempted by remember { mutableStateOf(false) } // Отслеживаем попытку биометрии
|
||||
|
||||
// Account selection state
|
||||
var accounts by remember { mutableStateOf<List<AccountItem>>(emptyList()) }
|
||||
@@ -270,7 +269,6 @@ fun UnlockScreen(
|
||||
}
|
||||
|
||||
android.util.Log.d("UnlockScreen", "🔐 Starting biometric unlock...")
|
||||
biometricAttempted = true
|
||||
|
||||
biometricManager.decryptPassword(
|
||||
activity = activity,
|
||||
@@ -300,42 +298,6 @@ fun UnlockScreen(
|
||||
)
|
||||
}
|
||||
|
||||
// Автоматически запускаем биометрию при загрузке данных
|
||||
LaunchedEffect(dataLoaded, selectedAccount, isBiometricEnabled, savedPasswordsMap) {
|
||||
android.util.Log.d("UnlockScreen", "🚀 Auto-biometric LaunchedEffect")
|
||||
android.util.Log.d("UnlockScreen", " dataLoaded: $dataLoaded")
|
||||
android.util.Log.d("UnlockScreen", " selectedAccount: ${selectedAccount?.publicKey}")
|
||||
android.util.Log.d("UnlockScreen", " isBiometricEnabled: $isBiometricEnabled")
|
||||
android.util.Log.d("UnlockScreen", " biometricAvailable: $biometricAvailable")
|
||||
android.util.Log.d("UnlockScreen", " activity: $activity")
|
||||
android.util.Log.d("UnlockScreen", " biometricAttempted: $biometricAttempted")
|
||||
|
||||
if (!dataLoaded) {
|
||||
android.util.Log.d("UnlockScreen", "⏸️ Data not loaded yet")
|
||||
return@LaunchedEffect
|
||||
}
|
||||
|
||||
if (biometricAttempted) {
|
||||
android.util.Log.d("UnlockScreen", "⏸️ Biometric already attempted")
|
||||
return@LaunchedEffect
|
||||
}
|
||||
|
||||
if (selectedAccount != null &&
|
||||
isBiometricEnabled &&
|
||||
activity != null &&
|
||||
biometricAvailable is BiometricAvailability.Available) {
|
||||
|
||||
val encryptedPassword = savedPasswordsMap[selectedAccount!!.publicKey]
|
||||
android.util.Log.d("UnlockScreen", "🔑 Has password: ${encryptedPassword != null}")
|
||||
|
||||
if (encryptedPassword != null) {
|
||||
// Небольшая задержка для анимации UI
|
||||
delay(300)
|
||||
tryBiometricUnlock()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Filter accounts by search
|
||||
val filteredAccounts =
|
||||
remember(searchQuery, accounts) {
|
||||
|
||||
Reference in New Issue
Block a user