aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-11-16 14:26:44 +0100
committerdec05eba <dec05eba@protonmail.com>2020-11-16 14:26:44 +0100
commit4eeaa5c2b889a22c23199247ccc87fb717e6cbcb (patch)
treeda97727d2ce19fd7796bad3fc13a1b8b7e45ada4 /plugins
parentf1f10a2f22f14636f0ed35a14ca1ba5355c86d15 (diff)
Matrix: fix unread red marker when fetching previous messages
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 7390062..789b301 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -207,7 +207,7 @@ namespace QuickMedia {
virtual void room_add_tag(RoomData *room, const std::string &tag) = 0;
// Note: calling |room| methods inside this function is not allowed
virtual void room_remove_tag(RoomData *room, const std::string &tag) = 0;
- virtual void room_add_new_messages(RoomData *room, const Messages &messages, bool is_initial_sync, bool sync_is_cache) = 0;
+ virtual void room_add_new_messages(RoomData *room, const Messages &messages, bool is_initial_sync, bool sync_is_cache, MessageDirection message_dir) = 0;
virtual void add_invite(const std::string &room_id, const Invite &invite) = 0;
virtual void remove_invite(const std::string &room_id) = 0;
@@ -233,7 +233,7 @@ namespace QuickMedia {
void leave_room(RoomData *room, LeaveType leave_type, const std::string &reason) override;
void room_add_tag(RoomData *room, const std::string &tag) override;
void room_remove_tag(RoomData *room, const std::string &tag) override;
- void room_add_new_messages(RoomData *room, const Messages &messages, bool is_initial_sync, bool sync_is_cache) override;
+ void room_add_new_messages(RoomData *room, const Messages &messages, bool is_initial_sync, bool sync_is_cache, MessageDirection message_dir) override;
void add_invite(const std::string &room_id, const Invite &invite) override;
void remove_invite(const std::string &room_id) override;
@@ -250,13 +250,14 @@ namespace QuickMedia {
MatrixRoomTagsPage *room_tags_page;
MatrixInvitesPage *invites_page;
private:
- void update_room_description(RoomData *room, bool is_initial_sync);
+ void update_room_description(RoomData *room, Messages &new_messages, bool is_initial_sync);
void update_pending_room_messages(MatrixPageType page_type);
private:
struct RoomMessagesData {
Messages messages;
bool is_initial_sync;
bool sync_is_cache;
+ MessageDirection message_dir;
};
struct Notification {