Skip to content
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

Lazy loading members #263

Merged
merged 29 commits into from
Dec 14, 2018
Merged

Lazy loading members #263

merged 29 commits into from
Dec 14, 2018

Conversation

KitsuneRal
Copy link
Member

Closes #253.

Both now use through a common JsonConverter<> template class with its
base definition tuned for structs/QJsonObjects and specialisations for
non-object types. This new implementation doesn't work with virtual
fillJson functions yet (so EventContent classes still use toJson as a
member function) and does not cope quite well with non-constructible
objects (you have to specialise JsonConverter<> rather than, more
intuitively, JsonObjectConverter<>), but overall is more streamlined
compared to the previous implementation. It also fixes one important
issue that pushed for a rewrite: the previous implementation was not
working with structure hierarchies at all so (in particular) the Filter
part of CS API was totally disfunctional.
This should cover the Connection-related part of #253.

Connection gained lazyLoading/setLazyLoading accessors and the respective Q_PROPERTY.
When lazy loading is on, sync() adds lazy_load_members: true to its filter.
The members of the summary can be omitted in the payload; this change fixes calculation
of the roomname from hero names passed in room summary. Also: RoomSummary can be dumped to QDebug now.
Commit fd52459 introduced a regression rendering the cache unusable
after a client restart (an empty state overwrites whatever state was in
the cache). This commit contains the fix, along with more room change
tracking.
This concludes beta-version of lazy-loading support in libQMatrixClient (#253).
...instead of the entire function body wrapped in an if block.
GetMembersByRoomJob was dysfunctional so far, creating "unknown
RoomMemberEvents" instead of proper ones. Now that we need it for lazy-
loading, it's fixed!
… is done

Because lazy-loading test is executed on a room different from the test room.
@KitsuneRal KitsuneRal merged commit fcc8d2c into master Dec 14, 2018
@KitsuneRal KitsuneRal deleted the kitsune-lazy-loading branch December 15, 2018 06:24
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

Successfully merging this pull request may close these issues.

1 participant