summary refs log tree commit diff
path: root/include/RoomState.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-28 20:46:34 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-28 20:46:34 +0300
commitc18a49915b4b98ac7f837a1feca3e243ac44940d (patch)
tree98fda5a56640689bebf7b6294722f4151731a156 /include/RoomState.h
parentClean up headers (diff)
downloadnheko-c18a49915b4b98ac7f837a1feca3e243ac44940d.tar.xz
Save the changes between syncs in cache
- Fixes high cpu issues caused by the serialization of the whole
  in-memory state.
- Display name changes are now visible in the timeline.
Diffstat (limited to 'include/RoomState.h')
-rw-r--r--include/RoomState.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/RoomState.h b/include/RoomState.h

index 57955e56..db1cdc68 100644 --- a/include/RoomState.h +++ b/include/RoomState.h
@@ -41,6 +41,9 @@ namespace events = matrix::events; class RoomState { public: + RoomState(); + RoomState(const QJsonArray &events); + // Calculate room data that are not immediatly accessible. Like room name and // avatar. // @@ -71,7 +74,8 @@ public: events::StateEvent<events::TopicEventContent> topic; // Contains the m.room.member events for all the joined users. - QMap<QString, events::StateEvent<events::MemberEventContent>> memberships; + using UserID = QString; + QMap<UserID, events::StateEvent<events::MemberEventContent>> memberships; private: QUrl avatar_;