aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 1566212..341a534 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -309,6 +309,7 @@ namespace QuickMedia {
private:
std::map<RoomData*, std::shared_ptr<BodyItem>> room_body_item_by_room;
std::map<RoomData*, std::shared_ptr<Message>> last_message_by_room;
+ std::unordered_set<std::string> notifications_shown;
UsersByRoom users_by_room;
};
@@ -492,10 +493,14 @@ namespace QuickMedia {
void add_notification(MatrixNotification notification);
void set_room_as_read(RoomData *room);
private:
+ bool has_fetched = false;
Matrix *matrix;
Body *notifications_body;
MatrixRoomsPage *all_rooms_page;
- std::unordered_map<std::string, std::vector<std::shared_ptr<BodyItem>>> room_notifications;
+ // room id[event_id[]]
+ std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<BodyItem>>> room_notifications;
+ // Notifications are here until the notifications has been fetched, so that page handler doesn't the notifications
+ std::unordered_map<std::string, std::unordered_map<std::string, MatrixNotification>> pending_room_notifications;
};
class MatrixInviteUserPage : public Page {