diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-09 19:55:14 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-09 19:55:14 +0900 |
commit | 9225eaec426ecd44a1c203e11e1aafe7772c46d7 (patch) | |
tree | 7f1ea9148a5c85bd1e30b08b3638baac6a53023d /lib/room.h | |
parent | 1678296d5b6190679a9ef950f9421945fa159f8f (diff) | |
download | libquotient-9225eaec426ecd44a1c203e11e1aafe7772c46d7.tar.gz libquotient-9225eaec426ecd44a1c203e11e1aafe7772c46d7.zip |
Room: track more changes; fix cache smashing upon restart
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.
Diffstat (limited to 'lib/room.h')
-rw-r--r-- | lib/room.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -120,8 +120,9 @@ namespace QMatrixClient EncryptionOn = 0x100, AccountDataChange = 0x200, SummaryChange = 0x400, - OtherChange = 0x1000, - AnyChange = 0x1FFF + ReadMarkerChange = 0x800, + OtherChange = 0x8000, + AnyChange = 0xFFFF }; Q_DECLARE_FLAGS(Changes, Change) Q_FLAG(Changes) @@ -467,7 +468,7 @@ namespace QMatrixClient protected: /// Returns true if any of room names/aliases has changed virtual Changes processStateEvent(const RoomEvent& e); - virtual void processEphemeralEvent(EventPtr&& event); + virtual Changes processEphemeralEvent(EventPtr&& event); virtual Changes processAccountDataEvent(EventPtr&& event); virtual void onAddNewTimelineEvents(timeline_iter_t /*from*/) { } virtual void onAddHistoricalTimelineEvents(rev_iter_t /*from*/) { } |