mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix multiple biometric menu #332
This commit is contained in:
@@ -249,11 +249,18 @@ class AdvancedUnlockedManager(var context: FragmentActivity,
|
|||||||
biometricUnlockDatabaseHelper = null
|
biometricUnlockDatabaseHelper = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only to fix multiple fingerprint menu #332
|
||||||
|
private var addBiometricMenuInProgress = false
|
||||||
fun inflateOptionsMenu(menuInflater: MenuInflater, menu: Menu) {
|
fun inflateOptionsMenu(menuInflater: MenuInflater, menu: Menu) {
|
||||||
cipherDatabaseAction.containsCipherDatabase(databaseFileUri) {
|
if (!addBiometricMenuInProgress) {
|
||||||
if ((biometricMode != Mode.UNAVAILABLE
|
addBiometricMenuInProgress = true
|
||||||
&& biometricMode != Mode.NOT_CONFIGURED) && it)
|
cipherDatabaseAction.containsCipherDatabase(databaseFileUri) {
|
||||||
menuInflater.inflate(R.menu.advanced_unlock, menu)
|
if ((biometricMode != Mode.UNAVAILABLE && biometricMode != Mode.NOT_CONFIGURED)
|
||||||
|
&& it) {
|
||||||
|
menuInflater.inflate(R.menu.advanced_unlock, menu)
|
||||||
|
addBiometricMenuInProgress = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user