diff --git a/lib/src/kdbx_format.dart b/lib/src/kdbx_format.dart index dbf7550..20b2c29 100644 --- a/lib/src/kdbx_format.dart +++ b/lib/src/kdbx_format.dart @@ -35,10 +35,8 @@ class Credentials { } } -class KdbxFile with Changeable { - KdbxFile(this.credentials, this.header, this.body) { - _subscribeToChildren(); - } +class KdbxFile { + KdbxFile(this.credentials, this.header, this.body); static final protectedValues = Expando(); @@ -51,8 +49,6 @@ class KdbxFile with Changeable { protectedValues[node] = value; } - final StreamSubscriptions _subscriptions = StreamSubscriptions(); - final Credentials credentials; final KdbxHeader header; final KdbxBody body; @@ -80,23 +76,23 @@ class KdbxFile with Changeable { .cast() .followedBy(body.rootGroup.getAllEntries()); - void _subscribeToChildren() { - final allObjects = _allObjects; - for (final obj in allObjects) { - _subscriptions.handle(obj.changes.listen((event) { - if (event.isDirty) { - isDirty = true; - if (event.object is KdbxGroup) { - Future(() { - // resubscribe, just in case some child groups/entries have changed. - _subscriptions.cancelSubscriptions(); - _subscribeToChildren(); - }); - } - } - })); - } - } +// void _subscribeToChildren() { +// final allObjects = _allObjects; +// for (final obj in allObjects) { +// _subscriptions.handle(obj.changes.listen((event) { +// if (event.isDirty) { +// isDirty = true; +// if (event.object is KdbxGroup) { +// Future(() { +// // resubscribe, just in case some child groups/entries have changed. +// _subscriptions.cancelSubscriptions(); +// _subscribeToChildren(); +// }); +// } +// } +// })); +// } +// } } class KdbxBody extends KdbxNode {