diff --git a/lib/src/kdbx_object.dart b/lib/src/kdbx_object.dart index 23361fa..60db13d 100644 --- a/lib/src/kdbx_object.dart +++ b/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 {