Skip to content

Commit dd48d6c

Browse files
authored
LiveList autoupdate included sub-objects (parse-community#349)
* LiveList: reload included objects First implementation * Key was wrong on order change * include sub-includes * reuse loaded pointers * Deleted stuff * Adding listening on included objects to LiveList * Updated readme for ParseLiveList * Update parse_live_list.dart
1 parent 1ba224f commit dd48d6c

File tree

2 files changed

+214
-42
lines changed

2 files changed

+214
-42
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ liveQuery.client.unSubscribe(subscription);
433433
## ParseLiveList
434434
ParseLiveList makes implementing a dynamic List as simple as possible.
435435

436-
436+
#### General Use
437437
It ships with the ParseLiveList class itself, this class manages all elements of the list, sorts them,
438438
keeps itself up to date and Notifies you on changes.
439439

@@ -487,8 +487,19 @@ ParseLiveListWidget<ParseObject>(
487487
duration: Duration(seconds: 1),
488488
);
489489
```
490+
### included Sub-Objects
491+
By default, ParseLiveQuery will provide you with all the objects you included in your Query like this:
492+
```dart
493+
queryBuilder.includeObject(/*List of all the included sub-objects*/);
494+
```
495+
ParseLiveList will not listen for updates on this objects by default.
496+
To activate listening for updates on all included objects, add `listenOnAllSubItems: true` to your ParseLiveListWidgets constructor.
497+
If you want ParseLiveList to listen for updates on only some sub-objects, use `listeningIncludes: const <String>[/*all the included sub-objects*/]` instead.
498+
Just as QueryBuilder, ParseLiveList supports nested sub-objects too.
499+
500+
**NOTE:** Currently ParseLiveList wont update your sub-objects after your client reconnects to the web.
490501

491-
Note: To use this features you have to enable [Live Queries](#live-queries) first.
502+
**NOTE:** To use this features you have to enable [Live Queries](#live-queries) first.
492503

493504
## Users
494505
You can create and control users just as normal using this SDK.

0 commit comments

Comments
 (0)