From 4de2d80e4371e50419823961789424d40561f75a Mon Sep 17 00:00:00 2001 From: Gil Date: Sun, 15 Apr 2018 16:56:43 -0700 Subject: Replace `QueryListenOptions` with simple booleans (#1106) * Replace `QueryListenOptions` with simple booleans Instead of calling addSnapshotListener( options:QueryListenOptions.includeQueryMetadataChanges() .includeDocumentMetadataChanges()) call addSnapshotListener(includeMetadataChanges:true) Also change `QuerySnapshot.documentChanges()` into a method which optionally takes `includeMetadataChanges:true`. By default even when listening to a query with `inlcudeMetadataChanges:true` metadata-only document changes are suppressed because they're confusing. * Revert QuerySnapshot.documentChanges back to a property Add usage. --- Firestore/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Firestore/CHANGELOG.md') diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 00e16f5..4761a62 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -3,6 +3,16 @@ Instead of calling `addSnapshotListener(options: DocumentListenOptions.includeMetadataChanges(true))` call `addSnapshotListener(includeMetadataChanges:true)`. +- [changed] Replaced the `QueryListenOptions` object with simple booleans. + Instead of calling + `addSnapshotListener(options: + QueryListenOptions.includeQueryMetadataChanges(true) + .includeDocumentMetadataChanges(true))` + call `addSnapshotListener(includeMetadataChanges:true)`. +- [changed] `QuerySnapshot.documentChanges()` is now a method which optionally + takes `includeMetadataChanges:true`. By default even when listening to a + query with `includeMetadataChanges:true` metadata-only document changes are + suppressed in `documentChanges()`. - [changed] Replaced the `SetOptions` object with a simple boolean. Instead of calling `setData(["a": "b"], options: SetOptions.merge())` call `setData(["a": "b"], merge: true)`. -- cgit v1.2.3