Skip to content

LiveQuery Not Working 1.0.26? ParseLiveList #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pastordee opened this issue Mar 11, 2020 · 36 comments
Closed

LiveQuery Not Working 1.0.26? ParseLiveList #330

pastordee opened this issue Mar 11, 2020 · 36 comments

Comments

@pastordee
Copy link
Contributor

pastordee commented Mar 11, 2020

LiveQuery Not Working since updating to 1.0.26 with ParseLiveList, it does not give any error.
new post and update do not take effect, is there something I have to do with LiveQuery subscription and is anyone facing the same thing.

ps, the app on 1.0.25 is working fine.

@fischerscode
Copy link
Contributor

fischerscode commented Mar 11, 2020

@pastordee
Just to be clear:

  • in your dependencies you are no longer referencing 1.0.25 but 1.0.26
  • you have done no changes to your code

Indeed there are changes is LiveQuery. In the README of 1.0.26 you can see, how you have to use it now.
Instead of liveQuery.subscribe(query) you have to run liveQuery.client.subscribe(query) this returns you a Subscription, on this subscription you can listen for changes.
subscription.on(LiveQueryEvent.create, (value) {});

ParseLiveList is just a new feature build on LiveQuery.

@pastordee
Copy link
Contributor Author

pastordee commented Mar 11, 2020

Yes everything is the same is only on one page I have added the ParseLiveList to test it, It loads the list fine but when you edit or add a new item the list don't reload,

as for the other pages, I have not touched them but LiveQuery is not working for then neither .
When I go back to 1.0.25 everything works

@fischerscode
Copy link
Contributor

Your project is not open source right? Otherwise I would have a look in the code.

It seems like the LiveQuery connection is not established.

Could you please add debug: true, as a parameter to your parse initialization, reinstall the app and post all logs starting with LiveQueryReconnectingController.

@pastordee
Copy link
Contributor Author

This is the app I don’t mind if you want to help that will be great

https://pcdl.page.link/prayers

I’m on the road now when I get home I will turn Debug

@fischerscode
Copy link
Contributor

In case turning on debug gives us no hint, I would be happy to peak into the code.

@fischerscode
Copy link
Contributor

On my IOS emulator, I have the same problem.
I will investigate it later.

fischerscode added a commit to fischerscode/Parse-SDK-Flutter that referenced this issue Mar 12, 2020
@fischerscode
Copy link
Contributor

The problem is a different behavior of Connectivity().onConnectivityChangedon Android and IOS.

@fischerscode
Copy link
Contributor

@pastordee
Please check out the current release/1.0.26 version.
I think it should be fixed now.

@pastordee
Copy link
Contributor Author

pastordee commented Mar 12, 2020

@pastordee
Please check out the current release/1.0.26 version.
I think it should be fixed now.

Thank you so much, my live query is working and with ParseLiveListWidget when I edit on another device it shows in debug that it has been updated but ParseLiveListWidget don't reload.

`_queryBuilder = QueryBuilder(Journal())
..setLimit(pageLimit)
..whereEqualTo("user", globals.user)
..orderByDescending("createdAt")
..includeObject(["user"]);

ParseLiveListWidget(
query: _queryBuilder,
duration: const Duration(seconds: 0),
childBuilder: (BuildContext context, ParseLiveListElementSnapshot snapshot) {
if (snapshot.failed) {
return const Text('something went wrong!');
} else if (snapshot.hasData) {
return _itemBuilder(context, snapshot);
}
else {
return CircularProgressIndicator();
// return const ListTile(
// leading: CircularProgressIndicator(),
// );
}

          }
         
          ),

`

@fischerscode
Copy link
Contributor

@pastordee
I guess Journal is a custom ParseObject class.
Please change
_queryBuilder = QueryBuilder(Journal()) to _queryBuilder = QueryBuilder<Journal>(Journal())
and
ParseLiveListWidget( to ParseLiveListWidget<Journal>(
and
ParseLiveListElementSnapshot snapshot to ParseLiveListElementSnapshot<Journal> snapshot.

Then try again and let me know if it made any difference.

@fischerscode
Copy link
Contributor

@pastordee
I somehow did not notice it since now.
Could you please change 1.26 in the issue title to 1.0.26?
Thanks!

@pastordee pastordee changed the title LiveQuery Not Working 1.26 ParseLiveList LiveQuery Not Working 1.26? ParseLiveList Mar 12, 2020
@pastordee
Copy link
Contributor Author

pastordee commented Mar 12, 2020

@pastordee
I guess Journal is a custom ParseObject class.
Please change
_queryBuilder = QueryBuilder(Journal()) to _queryBuilder = QueryBuilder<Journal>(Journal())
and
ParseLiveListWidget( to ParseLiveListWidget<Journal>(
and
ParseLiveListElementSnapshot snapshot to ParseLiveListElementSnapshot<Journal> snapshot.

Then try again and let me know if it made any difference.

sorry I paste the wrong thing that's how I have it in my code
_queryBuilder = QueryBuilder<Journal>(Journal()) ..setAmountToSkip(pageIndex) ..setLimit(pageLimit) ..whereEqualTo("user", globals.user) ..orderByDescending("createdAt") ..includeObject(["user"]);

`ParseLiveListWidget(
query: _queryBuilder,
duration: const Duration(seconds: 0),
childBuilder: (BuildContext context, ParseLiveListElementSnapshot snapshot) {
if (snapshot.failed) {
return const Text('something went wrong!');
} else if (snapshot.hasData) {
return _itemBuilder(context, snapshot);
}
else {
return CircularProgressIndicator();
// return const ListTile(
// leading: CircularProgressIndicator(),
// );
}

          }
         
          )`

@fischerscode
Copy link
Contributor

@pastordee
I think I wrote #330 (comment) a little confusing,
I didn't meant adding a "?" but changing the "1.26" to "1.0.26"

Could you perform the second and third change in #330 (comment) and give me an update?

@pastordee pastordee changed the title LiveQuery Not Working 1.26? ParseLiveList LiveQuery Not Working 1.0.26? ParseLiveList Mar 12, 2020
@pastordee
Copy link
Contributor Author

@maaeps

Sorry is the same
This is the result which is right but nothing happens in terms of updating the ParseLiveListWidget until I reload it myself.

Class: Journal
Function: ParseApiRQ.save
Status Code: 200
Payload: {"className":"Journal","objectId":"fIGAAr8Jo4","createdAt":"2019-12-08T11:21:48.429Z","updatedAt":"2020-03-12T20:04:28.170Z","user":{"__type":"Pointer","className":"_User","objectId":"3dLYgtOt11"},"journal":"Pray for Mordecai legs constantly. ","title":"Mordecai","noteCount":7,"answered":false,"ACL":{"3dLYgtOt11":{"read":true,"write":true},"":{"read":true,"write":true}}}
╰--
flutter: LiveQuery: : Listen: {"op":"update","clientId":"345ea6bc-d47b-435b-8189-8a4202c2b299","requestId":2,"object":{"user":{"__type":"Pointer","className":"_User","objectId":"3dLYgtOt11"},"journal":"Pray for Mordecai legs constantly. ","title":"Mordecai","noteCount":7,"answered":false,"createdAt":"2019-12-08T11:21:48.429Z","updatedAt":"2020-03-12T20:04:28.170Z","ACL":{"3dLYgtOt11":{"read":true,"write":true},"
":{"read":true,"write":true}},"__type":"Object","className":"Journal","objectId":"fIGAAr8Jo4"},"original":{"user":{"__type":"Pointer","className":"_User","objectId":"3dLYgtOt11"},"journal":"Pray for Mordecai legs constantly","title":"Mordecai","noteCount":7,"answered":false,"createdAt":"2019-12-08T11:21:48.429Z","updatedAt":"2020-03-12T19:56:07.448Z","ACL":{"3dLYgtOt11":{"read":true,"write":true},"*":{"read":true,"write":true}},"__type":"Object","className":"Journal","objectId":"fIGAAr8Jo4"}}

@pastordee
Copy link
Contributor Author

@maaeps

Thanks again for your hard work I really appreciate it and God bless

@fischerscode
Copy link
Contributor

@pastordee
Please put down a breakpoint in the file utils/parse_live_list.dart of the SDK inside the function void _objectUpdated(T object) { to see, if this function gets reached.
Or send me the code/a part of it to [email protected].

@fischerscode
Copy link
Contributor

@pastordee
Your _itemBuilder is pretty complex. Please try a more simple Widget (e.g. just a Text widget) for testing.
Secondly, I have created a branch with many debug prints inside the LiveList file. Please use this branch in your project, turn OFF debugging in your parse initialization and send me the log parts starting with ParseLiveList (or the whole log).

@fischerscode
Copy link
Contributor

@pastordee
Could you please also add key: UniqueKey(), to your Card inside the itemBuilder?

@fischerscode
Copy link
Contributor

@pastordee
I think I found the problem.
There a Exception gets thrown, if ParseLiveList is used together with a Custom ParseObject.
Will be fixed soon.

@pastordee
Copy link
Contributor Author

pastordee commented Mar 13, 2020 via email

@fischerscode
Copy link
Contributor

reference #335

@fischerscode
Copy link
Contributor

@pastordee
I created the PR #336. This should fix the problem.
You can use/try this branch while #336 is pending.

@pastordee
Copy link
Contributor Author

pastordee commented Mar 13, 2020

@pastordee
I created the PR #336. This should fix the problem.
You can use/try this branch while #336 is pending.

It works like magic thank you so much

can you please do PR and add #334 to it as it fixes that bug when the query dose not match thanks

@fischerscode
Copy link
Contributor

@pastordee
Glad to hear that.
And sure.

@pastordee
Copy link
Contributor Author

@maaeps
Hi morning hope you had a great weekend is there any chance you will be able to work on ParseSliverlist

@fischerscode
Copy link
Contributor

fischerscode commented Mar 16, 2020

You mean to base ParseLiveListWidget on SliverList?

@pastordee
Copy link
Contributor Author

pastordee commented Mar 16, 2020 via email

@pastordee
Copy link
Contributor Author

pastordee commented Mar 16, 2020

You mean to base ParseLiveListWidget on SliverList?

or have both of them
ParseLiveListWidget
ParseLiveSliverListWidget

@fischerscode
Copy link
Contributor

I've not worked with Slivers yet.
But as ParseLiveList handles all of the fetching etc., adding something based on SliverList should work.
Actually I've planed working on LiveList again. Since I am not happy with some of the scrolling behavior when adding/removing items at the top of the list. Maybe working with Slivers will provide more flexibility.

phillwiggins added a commit that referenced this issue Mar 28, 2020
* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (#301)

* Added an example of how to update existing object values (#309)

* Fixed the Parse().initialize's return value (#307)

* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (#301)

* Fixed the parse initialize method

Parse().initialize returns a new instantiation of the Parse class, but it should return the initialized instance.

Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Added example for update existing Object values

Maybe need some correction. Thank you.

Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Specifying return type of get<T> as T instead of dynamic (#310)

* Fixed the Parse().initialize's return value (#307)

* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (#301)

* Fixed the parse initialize method

Parse().initialize returns a new instantiation of the Parse class, but it should return the initialized instance.

Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Specified T return type instead of dynamic for get<T> method

Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Live query connection stream (#314)

* Fixed the Parse().initialize's return value (#307)

* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (#301)

* Fixed the parse initialize method

Parse().initialize returns a new instantiation of the Parse class, but it should return the initialized instance.

Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* added live-query-client-event-stream

* Update parse_live_query.dart

* Cleanup

Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Livequery reconnecting controller (#316)

* Fix: reconnecting

Done as in #315 (comment) described.

* Changed type of Future

Done as described in fischerscode@805e830#r37587405.

* Revert "Changed type of Future"

This reverts commit fecee76.

* adding LiveQueryReconnectingController

This is a solution for #315 (comment)

How it works:
- Only the LiveQueryReconnectingController handles reconnecting after a connection loss.
- LiveQueryReconnectingController holds informations:
  1. connection state of the device
  2. did the user disconnected from the server
  3. is currently a connection to the server estalished
- LiveQueryReconnectingController tries to reconnect after preset timespans.

* cleanup

* remove _userDisconnected from Client

This is not needed any more.
Keeping track of this information is now done by LiveQueryReconnectingController.

* subscribe(query) modified

Wait until client is connected to live-query-server.

Fixes fischerscode@d058eb0#r37612749

* Parsequery OR (#317)

* Start adding or

First idea for #213

Works with normal Query and LiveQuery.

Missing:
- any kind of "UserError handling"
- further testing

* Update parse_query.dart

* Fix for Sembast-API change (#322)

See: #321 (comment)

* added QueryBuilder.copy(QueryBuilder<T> query) (#320)

* added QueryBuilder.copy(QueryBuilder<T> query)

Added a implementation to create a new QueryBuilder based on an old one.
This is a deep copy.
Tested only with basic queries.

* added QueryBuilder.copy(QueryBuilder<T> query)

Added a implementation to create a new QueryBuilder based on an old one.
This is a deep copy.
Tested only with basic queries.

* ParseLiveList (#324)

* Created ParseLiveList

* LiveList & LivListBuilder works

* Cleanup

* changed to animated list

* Fix in dataloading

* updated AnimatedList

* Finished Animations & cleanup

* handle reconnect

* Added dispose methodes & renamed classes & cleanup

* cleanup

* Fix animation duration

* added README ParseLiveList section

* Initialized example_livelist

* Update application_constants.dart

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 4d8982d.

* Update .gitignore

* HotFix: object Update from client

If the client changes the object.
(ParseObject does not get copied)

* Implemented simple example

* Update README.md

* Update main.dart

* Update README.md

* Update README.md

* added ParseACL to parseEncode (#326)

As described in #325 (comment).

Should Fix #325

* ParseLiveList Performance improvement (#327)

* Created ParseLiveList

* LiveList & LivListBuilder works

* Cleanup

* changed to animated list

* Fix in dataloading

* updated AnimatedList

* Finished Animations & cleanup

* handle reconnect

* Added dispose methodes & renamed classes & cleanup

* cleanup

* Fix animation duration

* added README ParseLiveList section

* Initialized example_livelist

* Update application_constants.dart

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 4d8982d.

* Update .gitignore

* HotFix: object Update from client

If the client changes the object.
(ParseObject does not get copied)

* Implemented simple example

* Update README.md

* Update main.dart

* Update README.md

* Update README.md

* LiveList - Performance Improvement

This is the change mentioned in #324 (comment)

Requires #326

* LiveList - Performance Improvement

This is the change mentioned in #324 (comment)

Requires #326

* example_livelist: use clientKey

* Changed example_livelist query

In the README I wrote, you can use a field called "show" to hide elements.

* ParseLiveListElementSnapshot added (#329)

* Created ParseLiveList

* LiveList & LivListBuilder works

* Cleanup

* changed to animated list

* Fix in dataloading

* updated AnimatedList

* Finished Animations & cleanup

* handle reconnect

* Added dispose methodes & renamed classes & cleanup

* cleanup

* Fix animation duration

* added README ParseLiveList section

* Initialized example_livelist

* Update application_constants.dart

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 4d8982d.

* Update .gitignore

* HotFix: object Update from client

If the client changes the object.
(ParseObject does not get copied)

* Implemented simple example

* Update README.md

* Update main.dart

* Update README.md

* Update README.md

* LiveList - Performance Improvement

This is the change mentioned in #324 (comment)

Requires #326

* LiveList - Performance Improvement

This is the change mentioned in #324 (comment)

Requires #326

* example_livelist: use clientKey

* Changed example_livelist query

In the README I wrote, you can use a field called "show" to hide elements.

* Remove: RemovedItemBuilder

duplicade to ChildBuilder

* removed firstBuild

* ParseLiveListElementSnapshot added

* Clear unsaved changes (#331)

* added clearUnsavedChanges

An idea for #318

* moved clearUnsavedChanges to ParseBase

* LiveQueryController: connect at init (#332)

Should fix #330

* LiveList: fixed defaultBuilder (#333)

* Added generics to Query/LiveQuery (#336)

* LiveQuery: fixes list is null (#334)

* Fix: #341 (#342)

It seems like `subscription.on(LiveQueryEvent.update` reuses a existing object.

* Updating LiveQuery for web (#340)

* LiveQuery: fixes list is null

* Updating LiveQuery for web

parse_live_query_web was outdated compared to parse_live_query.

Note: parse_live_query was copied and fixed again for this change.

Co-authored-by: Phill Wiggins <[email protected]>

* Release/1.0.26 - Code formatting, remove lint issues

Co-authored-by: mregandla <[email protected]>
Co-authored-by: L. Rommy Arbantas <[email protected]>
Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Michal Baran <[email protected]>
Co-authored-by: Maximilian Fischer <[email protected]>
@hamidabdulmalik
Copy link

This is still not working for anroid. @maaeps how did you fix it please?

@fischerscode
Copy link
Contributor

@hamidabdulmalik
What is "This"?
What error do you get? / What seems wrong?
Does the livelist_example work for you?
Have you enabled LiveQuery?

I am sorry, but without a clear error description, I can not help you. There are too many factors.
This issue has been closed 19 days ago, you might want to consider opening a new one. So more people would see your post.

@pastordee
Copy link
Contributor Author

@maaeps
Hi just a quick question how do I turn this into a grid view

@fischerscode
Copy link
Contributor

fischerscode commented May 10, 2020

@pastordee
ParseLiveList does basically handles all the logic. LiveListWidget instantiates an instance of LiveList and listens for ParseLiveListEvent events.
You should be able to build a widget similarly to LiveListWidget that builds a GridView using GridView.builder(). You can use ParseLiveListElement as it is. ParseLiveListElement is basically the ParseLiveList equivalent in the context of a singe element. ParseLiveListElementWidget on the other hand is wont be suitable for you, I think.
The whole Widget part of LiveList seems to be complex, as I added animations. If you plan to build a GridView without any animations it might be as simple as this:
NOT TESTED!!!

class ParseLiveGridViewWidget<T extends ParseObject> extends StatefulWidget {
  const ParseLiveGridViewWidget({
    Key key,
    @required this.query,
    this.listLoadingElement,
    @required this.childBuilder,
    this.listenOnAllSubItems,
    this.listeningIncludes,
  }) : super(key: key);

  final QueryBuilder<T> query;
  final Widget listLoadingElement;

  final ChildBuilder<T> childBuilder;

  final bool listenOnAllSubItems;
  final List<String> listeningIncludes;

  @override
  _ParseLiveGridViewWidgetState<T> createState() =>
      _ParseLiveGridViewWidgetState<T>(
        query: query,
        listenOnAllSubItems: listenOnAllSubItems,
        listeningIncludes: listeningIncludes,
      );
}

class _ParseLiveGridViewWidgetState<T extends ParseObject>
    extends State<ParseLiveGridViewWidget<T>> {
  _ParseLiveGridViewWidgetState(
      {@required this.query,
      bool listenOnAllSubItems,
      List<String> listeningIncludes}) {
    ParseLiveList.create(
      query,
      listenOnAllSubItems: listenOnAllSubItems,
      listeningIncludes: listeningIncludes,
    ).then((ParseLiveList<T> value) {
      setState(() {
        _liveList = value;
        _liveList.stream.listen((ParseLiveListEvent<ParseObject> event) {
          if (event is ParseLiveListAddEvent) {
          } else if (event is ParseLiveListDeleteEvent) {}
        });
      });
    });
  }

  final QueryBuilder<T> query;
  ParseLiveList<T> _liveList;

  @override
  Widget build(BuildContext context) {
    return _liveList == null
        ? widget.listLoadingElement ?? Container()
        : buildWidget();
  }

  Widget buildWidget() {
    return GridView.builder(
      itemCount: _liveList?.size ?? 0,
      gridDelegate:
          const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
      itemBuilder: (BuildContext context, int index) {
        return ParseLiveGridViewElementWidget<T>(
          key: ValueKey<String>(_liveList?.getIdentifier(index) ?? '_NotFound'),
          stream: () => _liveList?.getAt(index),
          loadedData: () => _liveList?.getLoadedAt(index),
          childBuilder: widget.childBuilder,
        );
      },
    );
  }

  @override
  void dispose() {
    _liveList.dispose();
    _liveList = null;
    super.dispose();
  }
}

class ParseLiveGridViewElementWidget<T extends ParseObject>
    extends StatefulWidget {
  const ParseLiveGridViewElementWidget(
      {Key key, this.stream, this.loadedData, @required this.childBuilder})
      : super(key: key);

  final StreamGetter<T> stream;
  final DataGetter<T> loadedData;
  final ChildBuilder<T> childBuilder;

  @override
  _ParseLiveGridViewElementWidgetState<T> createState() {
    return _ParseLiveGridViewElementWidgetState<T>(loadedData, stream);
  }
}

class _ParseLiveGridViewElementWidgetState<T extends ParseObject>
    extends State<ParseLiveGridViewElementWidget<T>>
    with SingleTickerProviderStateMixin {
  _ParseLiveGridViewElementWidgetState(
      DataGetter<T> loadedDataGetter, StreamGetter<T> stream) {
    _snapshot = ParseLiveListElementSnapshot<T>(loadedData: loadedDataGetter());
    if (stream != null) {
      _streamSubscription = stream().listen(
        (T data) {
          if (widget != null) {
            setState(() {
              _snapshot = ParseLiveListElementSnapshot<T>(loadedData: data);
            });
          } else {
            _snapshot = ParseLiveListElementSnapshot<T>(loadedData: data);
          }
        },
        onError: (Object error) {
          if (error is ParseError) {
            if (widget != null) {
              setState(() {
                _snapshot = ParseLiveListElementSnapshot<T>(error: error);
              });
            } else {
              _snapshot = ParseLiveListElementSnapshot<T>(error: error);
            }
          }
        },
        cancelOnError: false,
      );
    }
  }

  ParseLiveListElementSnapshot<T> _snapshot;

  StreamSubscription<T> _streamSubscription;

  @override
  void dispose() {
    _streamSubscription?.cancel();
    _streamSubscription = null;
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return widget.childBuilder(context, _snapshot);
  }
}

@ZeroNilZero
Copy link

ZeroNilZero commented Jul 18, 2020

@maaeps why it load each results separately?
how can we get them all at once?

@fischerscode
Copy link
Contributor

@ZeroNilZero
The lazy loading is implemented to show long lists as quick as possible.However, for short lists this takes longer than loading them instantly.
I have implemented a function for turning off lazy loading. #407 But it has not been tested that much, yet.

fischerscode added a commit to fischerscode/Parse-SDK-Flutter that referenced this issue Sep 5, 2020
* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (parse-community#301)

* Added an example of how to update existing object values (parse-community#309)

* Fixed the Parse().initialize's return value (parse-community#307)

* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (parse-community#301)

* Fixed the parse initialize method

Parse().initialize returns a new instantiation of the Parse class, but it should return the initialized instance.

Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Added example for update existing Object values

Maybe need some correction. Thank you.

Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Specifying return type of get<T> as T instead of dynamic (parse-community#310)

* Fixed the Parse().initialize's return value (parse-community#307)

* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (parse-community#301)

* Fixed the parse initialize method

Parse().initialize returns a new instantiation of the Parse class, but it should return the initialized instance.

Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Specified T return type instead of dynamic for get<T> method

Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Live query connection stream (parse-community#314)

* Fixed the Parse().initialize's return value (parse-community#307)

* Release/1.0.26 - Update docs

* Updated Live Queries related documentation (parse-community#301)

* Fixed the parse initialize method

Parse().initialize returns a new instantiation of the Parse class, but it should return the initialized instance.

Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* added live-query-client-event-stream

* Update parse_live_query.dart

* Cleanup

Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Phill Wiggins <[email protected]>
Co-authored-by: mregandla <[email protected]>

* Livequery reconnecting controller (parse-community#316)

* Fix: reconnecting

Done as in parse-community#315 (comment) described.

* Changed type of Future

Done as described in 805e830#r37587405.

* Revert "Changed type of Future"

This reverts commit fecee76.

* adding LiveQueryReconnectingController

This is a solution for parse-community#315 (comment)

How it works:
- Only the LiveQueryReconnectingController handles reconnecting after a connection loss.
- LiveQueryReconnectingController holds informations:
  1. connection state of the device
  2. did the user disconnected from the server
  3. is currently a connection to the server estalished
- LiveQueryReconnectingController tries to reconnect after preset timespans.

* cleanup

* remove _userDisconnected from Client

This is not needed any more.
Keeping track of this information is now done by LiveQueryReconnectingController.

* subscribe(query) modified

Wait until client is connected to live-query-server.

Fixes d058eb0#r37612749

* Parsequery OR (parse-community#317)

* Start adding or

First idea for parse-community#213

Works with normal Query and LiveQuery.

Missing:
- any kind of "UserError handling"
- further testing

* Update parse_query.dart

* Fix for Sembast-API change (parse-community#322)

See: parse-community#321 (comment)

* added QueryBuilder.copy(QueryBuilder<T> query) (parse-community#320)

* added QueryBuilder.copy(QueryBuilder<T> query)

Added a implementation to create a new QueryBuilder based on an old one.
This is a deep copy.
Tested only with basic queries.

* added QueryBuilder.copy(QueryBuilder<T> query)

Added a implementation to create a new QueryBuilder based on an old one.
This is a deep copy.
Tested only with basic queries.

* ParseLiveList (parse-community#324)

* Created ParseLiveList

* LiveList & LivListBuilder works

* Cleanup

* changed to animated list

* Fix in dataloading

* updated AnimatedList

* Finished Animations & cleanup

* handle reconnect

* Added dispose methodes & renamed classes & cleanup

* cleanup

* Fix animation duration

* added README ParseLiveList section

* Initialized example_livelist

* Update application_constants.dart

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 4d8982d.

* Update .gitignore

* HotFix: object Update from client

If the client changes the object.
(ParseObject does not get copied)

* Implemented simple example

* Update README.md

* Update main.dart

* Update README.md

* Update README.md

* added ParseACL to parseEncode (parse-community#326)

As described in parse-community#325 (comment).

Should Fix parse-community#325

* ParseLiveList Performance improvement (parse-community#327)

* Created ParseLiveList

* LiveList & LivListBuilder works

* Cleanup

* changed to animated list

* Fix in dataloading

* updated AnimatedList

* Finished Animations & cleanup

* handle reconnect

* Added dispose methodes & renamed classes & cleanup

* cleanup

* Fix animation duration

* added README ParseLiveList section

* Initialized example_livelist

* Update application_constants.dart

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 4d8982d.

* Update .gitignore

* HotFix: object Update from client

If the client changes the object.
(ParseObject does not get copied)

* Implemented simple example

* Update README.md

* Update main.dart

* Update README.md

* Update README.md

* LiveList - Performance Improvement

This is the change mentioned in parse-community#324 (comment)

Requires parse-community#326

* LiveList - Performance Improvement

This is the change mentioned in parse-community#324 (comment)

Requires parse-community#326

* example_livelist: use clientKey

* Changed example_livelist query

In the README I wrote, you can use a field called "show" to hide elements.

* ParseLiveListElementSnapshot added (parse-community#329)

* Created ParseLiveList

* LiveList & LivListBuilder works

* Cleanup

* changed to animated list

* Fix in dataloading

* updated AnimatedList

* Finished Animations & cleanup

* handle reconnect

* Added dispose methodes & renamed classes & cleanup

* cleanup

* Fix animation duration

* added README ParseLiveList section

* Initialized example_livelist

* Update application_constants.dart

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 4d8982d.

* Update .gitignore

* HotFix: object Update from client

If the client changes the object.
(ParseObject does not get copied)

* Implemented simple example

* Update README.md

* Update main.dart

* Update README.md

* Update README.md

* LiveList - Performance Improvement

This is the change mentioned in parse-community#324 (comment)

Requires parse-community#326

* LiveList - Performance Improvement

This is the change mentioned in parse-community#324 (comment)

Requires parse-community#326

* example_livelist: use clientKey

* Changed example_livelist query

In the README I wrote, you can use a field called "show" to hide elements.

* Remove: RemovedItemBuilder

duplicade to ChildBuilder

* removed firstBuild

* ParseLiveListElementSnapshot added

* Clear unsaved changes (parse-community#331)

* added clearUnsavedChanges

An idea for parse-community#318

* moved clearUnsavedChanges to ParseBase

* LiveQueryController: connect at init (parse-community#332)

Should fix parse-community#330

* LiveList: fixed defaultBuilder (parse-community#333)

* Added generics to Query/LiveQuery (parse-community#336)

* LiveQuery: fixes list is null (parse-community#334)

* Fix: parse-community#341 (parse-community#342)

It seems like `subscription.on(LiveQueryEvent.update` reuses a existing object.

* Updating LiveQuery for web (parse-community#340)

* LiveQuery: fixes list is null

* Updating LiveQuery for web

parse_live_query_web was outdated compared to parse_live_query.

Note: parse_live_query was copied and fixed again for this change.

Co-authored-by: Phill Wiggins <[email protected]>

* Release/1.0.26 - Code formatting, remove lint issues

Co-authored-by: mregandla <[email protected]>
Co-authored-by: L. Rommy Arbantas <[email protected]>
Co-authored-by: James Brinkerhoff <[email protected]>
Co-authored-by: Michal Baran <[email protected]>
Co-authored-by: Maximilian Fischer <[email protected]>
@AsyraniAzni
Copy link

I've not worked with Slivers yet.
But as ParseLiveList handles all of the fetching etc., adding something based on SliverList should work.
Actually I've planed working on LiveList again. Since I am not happy with some of the scrolling behavior when adding/removing items at the top of the list. Maybe working with Slivers will provide more flexibility.

Sorry, maybe I miss something. Have you done implemented ParseLiveSliverListWidget? I did not find any reference. Sorry, if I miss something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants