Fix backup search #759

This commit is contained in:
J-Jamet
2020-10-25 17:48:16 +01:00
parent cd5cfbe009
commit 59607efa62
4 changed files with 16 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ KeePassDX(2.9)
* Fix biometric issues #724 #740 #731
* Fix autofill #725 #551
* Fix subdomain search #728
* Fix backup search #759
* Small fixes and translations #732 #736 #737 #738 #742
KeePassDX(2.8.7)

View File

@@ -186,6 +186,10 @@ class DatabaseKDB : DatabaseVersioned<Int, UUID, GroupKDB, EntryKDB>() {
override fun isInRecycleBin(group: GroupKDB): Boolean {
var currentGroup: GroupKDB? = group
// Init backup group variable
if (backupGroupId == BACKUP_FOLDER_UNDEFINED_ID)
findBackupGroupId()
if (backupGroup == null)
return false
@@ -203,17 +207,21 @@ class DatabaseKDB : DatabaseVersioned<Int, UUID, GroupKDB, EntryKDB>() {
return false
}
/**
* Ensure that the backup tree exists if enabled, and create it
* if it doesn't exist
*/
fun ensureBackupExists() {
private fun findBackupGroupId() {
rootGroups.forEach { currentGroup ->
if (currentGroup.level == 0
&& currentGroup.title.equals(BACKUP_FOLDER_TITLE, ignoreCase = true)) {
backupGroupId = currentGroup.id
}
}
}
/**
* Ensure that the backup tree exists if enabled, and create it
* if it doesn't exist
*/
fun ensureBackupExists() {
findBackupGroupId()
if (backupGroup == null) {
// Create recycle bin

View File

@@ -5,4 +5,5 @@
* Fix biometric issues #724 #740 #731
* Fix autofill #725 #551
* Fix subdomain search #728
* Fix backup search #759
* Small fixes and translations #732 #736 #737 #738 #742

View File

@@ -5,4 +5,5 @@
* Correction de problèmes biométriques #724 #740 #731
* Correction de l'autofill #725 #551
* Correction de la recherche de sous-domaine #728
* Correction de la recherche de backup #759
* Petites corrections et traductions #732 #736 #737 #738 #742