aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-12-09 19:55:14 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-12-09 19:55:14 +0900
commit9225eaec426ecd44a1c203e11e1aafe7772c46d7 (patch)
tree7f1ea9148a5c85bd1e30b08b3638baac6a53023d /lib/room.h
parent1678296d5b6190679a9ef950f9421945fa159f8f (diff)
downloadlibquotient-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.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/room.h b/lib/room.h
index 97d8454a..7b5be331 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -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*/) { }