Browse Source

add easy way to check whether a given object is located in the recycle bin.

pull/5/head
Herbert Poul 3 years ago
parent
commit
70c80ee527
  1. 13
      lib/src/kdbx_object.dart

13
lib/src/kdbx_object.dart

@ -247,6 +247,19 @@ abstract class KdbxObject extends KdbxNode {
}
void merge(MergeContext mergeContext, covariant KdbxObject other);
bool isInRecycleBin() {
final targetGroup = file!.recycleBin;
if (targetGroup == null) {
return false;
}
return isInGroup(targetGroup);
}
bool isInGroup(KdbxGroup group) {
final parent = this.parent;
return parent != null && (parent == group || parent.isInGroup(group));
}
}
class KdbxUuid {

Loading…
Cancel
Save