Skip to content

Commit

Permalink
[sembast] v3.8.1-4
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Dec 8, 2024
1 parent f66e43f commit 6b86860
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sembast/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 3.8.1-3
## 3.8.1-4

* Add experimental onAllStore listeners (not typed) `Database.addAllStoresChangesListener` and `Database.removeAllStoresChangesListener`

Expand Down
7 changes: 7 additions & 0 deletions sembast/lib/src/changes_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ class _AllStoresChangesListeners {
await listener.handleChanges(txn);
}
}

void txnClearChanges() {
for (var listener in _all.values) {
listener.txnClearChanges();
}
}
}

/// Database listener.
Expand Down Expand Up @@ -232,6 +238,7 @@ class DatabaseChangesListener {
for (var storeChangesListener in storeChangesListeners) {
storeChangesListener.txnClearChanges();
}
_allStoresChangesListenersOrNull?.txnClearChanges();
}

/// Add a global change listener
Expand Down
2 changes: 1 addition & 1 deletion sembast/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sembast
version: 3.8.1-3
version: 3.8.1-4
description: NoSQL persistent embedded file system document-based database for Dart VM and Flutter with encryption support.
homepage: https://github.com/tekartik/sembast.dart/tree/master/sembast
topics:
Expand Down

0 comments on commit 6b86860

Please sign in to comment.