fix: open auto prompt too often #2105

This commit is contained in:
J-Jamet committed 2025-08-13 17:59:56 +02:00
1 parent 698e3b7fb1
commit 04bcc6631c
2 files changed
+2 -5

No files matched your search

@@ -87,6 +87,7 @@ import com.kunzisoft.keepass.view.MainCredentialView
import com.kunzisoft.keepass.view.asError
import com.kunzisoft.keepass.view.showActionErrorIfNeeded
import com.kunzisoft.keepass.viewmodels.DatabaseFileViewModel
import com.kunzisoft.keepass.viewmodels.DeviceUnlockState
import com.kunzisoft.keepass.viewmodels.DeviceUnlockViewModel
import kotlinx.coroutines.launch
import java.io.FileNotFoundException
@@ -415,6 +416,7 @@ class MainCredentialActivity : DatabaseModeActivity() {
private fun launchGroupActivityIfLoaded(database: ContextualDatabase) {
// Check if database really loaded
if (database.loaded) {
mDeviceUnlockViewModel.allowAutoOpenBiometricPrompt = true
clearCredentialsViews(clearKeyFile = true, clearHardwareKey = true)
GroupActivity.launch(this,
database,
@@ -377,11 +377,6 @@ class DeviceUnlockFragment: Fragment() {
)
}
override fun onPause() {
super.onPause()
mDeviceUnlockViewModel.allowAutoOpenBiometricPrompt = true
}
override fun onDestroyView() {
mDeviceUnlockView = null
super.onDestroyView()