fix: Smal fix

This commit is contained in:
J-Jamet
2025-08-18 12:09:31 +02:00
parent 1fff0c526c
commit 24e859c4ce

View File

@@ -153,10 +153,6 @@ class DeviceUnlockViewModel(application: Application): AndroidViewModel(applicat
cipherDatabaseListener?.let {
cipherDatabaseAction.unregisterDatabaseListener(it)
}
// Reassign prompt state to open again if necessary
if (uiState.value.cryptoPromptState == DeviceUnlockPromptMode.IDLE_SHOW) {
cryptoPromptShowPending = true
}
clear()
changeMode(DeviceUnlockMode.BIOMETRIC_UNAVAILABLE)
}
@@ -406,6 +402,10 @@ class DeviceUnlockViewModel(application: Application): AndroidViewModel(applicat
}
fun clear(checkOperation: Boolean = false) {
// Reassign prompt state to open again if necessary
if (uiState.value.cryptoPromptState == DeviceUnlockPromptMode.IDLE_SHOW) {
cryptoPromptShowPending = true
}
if (!checkOperation || cryptoPrompt?.isDeviceCredentialOperation != true) {
cryptoPrompt = null
deviceUnlockManager = null