Skip to content

Commit

Permalink
Added changelog and added ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
papafe committed Jun 12, 2024
1 parent 634828a commit a9b00db
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
* Report the originating error that caused a client reset to occur. (Core 14.9.0)
* Allow the realm package, and code generated by realm_generator to be included when building
for web without breaking compilation. (Issue [#1374](https://github.com/realm/realm-dart/issues/1374))
* Added support for specifying key paths when listening to notifications on a collection with the `changesFor([List<String>? keyPaths])` method, available on `RealmResults`, `RealmList`, `RealmSet`, `RealmMap`. The key paths indicates which changes in properties should raise a notification.
```dart
@RealmModel()
class _Person {
late String name;
late int age;
late List<_Person> friends;
}
// ....
// Only changes to "age" or "friends" of any of the elements of the collection, together with changes to the collection itself, will raise a notification
realm.all<Person>().changesFor(["age", "friends"]).listen( .... )
```

### Fixed
* `Realm.writeAsync` did not handle async callbacks (`Future<T> Function()`) correctly. (Issue [#1667](https://github.com/realm/realm-dart/issues/1667))
Expand Down
9 changes: 1 addition & 8 deletions packages/realm_dart/test/results_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void main() {
subscription.cancel();
});

//TODO Not sure why this one doesn't pass
//TODO Remove skip when of https://github.com/realm/realm-core/issues/7805 is solved
test('empty keypath raises only shallow notifications', () async {
var config = Configuration.local([TestNotificationObject.schema, TestNotificationEmbeddedObject.schema, TestNotificationDifferentType.schema]);
var realm = getRealm(config);
Expand All @@ -188,13 +188,6 @@ void main() {

realm.write(() {
tno.stringProperty = "testString";
tno.intProperty = 23;
tno.remappedIntProperty = 25;
tno.embedded = TestNotificationEmbeddedObject();
tno.linkDifferentType = TestNotificationDifferentType();
tno.listDifferentType.add(TestNotificationDifferentType());
tno.setDifferentType.add(TestNotificationDifferentType());
tno.mapDifferentType["test"] = TestNotificationDifferentType();
});
await verifyNotifications(externalChanges, expectedNotifications: false);

Expand Down

0 comments on commit a9b00db

Please sign in to comment.