fix: revert checkUnlock

This commit is contained in:
J-Jamet
2025-08-23 00:03:59 +02:00
parent e6e40f9bd4
commit 564b5f10ea
2 changed files with 5 additions and 3 deletions

View File

@@ -145,6 +145,11 @@ class DeviceUnlockFragment: Fragment() {
} }
} }
override fun onResume() {
super.onResume()
mDeviceUnlockViewModel.checkUnlockAvailability()
}
fun cancelBiometricPrompt() { fun cancelBiometricPrompt() {
lifecycleScope.launch(Dispatchers.Main) { lifecycleScope.launch(Dispatchers.Main) {
mBiometricPrompt?.cancelAuthentication() mBiometricPrompt?.cancelAuthentication()

View File

@@ -350,9 +350,6 @@ class DeviceUnlockViewModel(application: Application): AndroidViewModel(applicat
AppLifecycleObserver.lockBackgroundEvent = true AppLifecycleObserver.lockBackgroundEvent = true
isAutoOpenBiometricPromptAllowed = false isAutoOpenBiometricPromptAllowed = false
cryptoPromptShowPending = false cryptoPromptShowPending = false
if (cryptoPrompt == null) {
checkUnlockAvailability()
}
_uiState.update { currentState -> _uiState.update { currentState ->
currentState.copy( currentState.copy(
cryptoPromptState = DeviceUnlockPromptMode.SHOW cryptoPromptState = DeviceUnlockPromptMode.SHOW