diff --git a/lib/src/kdbx_dao.dart b/lib/src/kdbx_dao.dart index dc16362..6c96a2d 100644 --- a/lib/src/kdbx_dao.dart +++ b/lib/src/kdbx_dao.dart @@ -51,6 +51,10 @@ extension KdbxDao on KdbxFile { move(group, recycleBin); } + void deleteEntry(KdbxEntry entry) { + move(entry, recycleBin); + } + void move(KdbxObject kdbxObject, KdbxGroup toGroup) { assert(toGroup != null); kdbxObject.times.locationChanged.setToNow(); diff --git a/lib/src/kdbx_object.dart b/lib/src/kdbx_object.dart index 860aade..bd92ab8 100644 --- a/lib/src/kdbx_object.dart +++ b/lib/src/kdbx_object.dart @@ -97,7 +97,7 @@ abstract class KdbxObject extends KdbxNode { set isDirty(bool dirty) { if (dirty) { times.modifiedNow(); - if (!isDirty && dirty) { + if (/*!isDirty && */ dirty) { file.dirtyObject(this); } } @@ -112,7 +112,10 @@ abstract class KdbxObject extends KdbxNode { return el; } - void internalChangeParent(KdbxGroup parent) => _parent = parent; + void internalChangeParent(KdbxGroup parent) { + _parent = parent; + isDirty = true; + } } class KdbxUuid {