From 1642f3cf40154e6183b7eae031a40d89c7eba948 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 22 Apr 2018 14:19:05 +0300 Subject: Update invites in the UI after sync --- include/Cache.h | 1 + include/RoomInfoListItem.h | 2 ++ include/RoomList.h | 1 + 3 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/Cache.h b/include/Cache.h index 78a35a65..1faf0677 100644 --- a/include/Cache.h +++ b/include/Cache.h @@ -137,6 +137,7 @@ public: std::vector joinedRooms(); QMap roomInfo(bool withInvites = true); + std::map invites(); //! Calculate & return the name of the room. QString getRoomName(lmdb::txn &txn, lmdb::dbi &statesdb, lmdb::dbi &membersdb); diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h index d06a759e..cc0acc7e 100644 --- a/include/RoomInfoListItem.h +++ b/include/RoomInfoListItem.h @@ -129,6 +129,8 @@ public: roomType_ = RoomType::Joined; } + bool isInvite() { return roomType_ == RoomType::Invited; } + signals: void clicked(const QString &room_id); void leaveRoom(const QString &room_id); diff --git a/include/RoomList.h b/include/RoomList.h index 53549cb4..a2df0380 100644 --- a/include/RoomList.h +++ b/include/RoomList.h @@ -56,6 +56,7 @@ public: void setFilterRooms(bool filterRooms); void setRoomFilter(std::vector room_ids); void updateRoom(const QString &room_id, const RoomInfo &info); + void cleanupInvites(const std::map &invites); signals: void roomChanged(const QString &room_id); -- cgit 1.5.1