aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-11-01 23:39:40 +0100
committerdec05eba <dec05eba@protonmail.com>2020-11-01 23:39:40 +0100
commit7045953e428076b0f07dc8043a5a1a0ac3d4bec5 (patch)
treef24971207e05d0b4691414e20009a254763fb25e /plugins
parent4262ae6c87b4c11f7fe958a91fdd3333a8c5138c (diff)
Matrix: do not show notification for cache sync messages
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 6af1bb8..903215b 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -183,7 +183,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) = 0;
+ virtual void room_add_new_messages(RoomData *room, const Messages &messages, bool is_initial_sync, bool sync_is_cache) = 0;
virtual void add_invite(const std::string &room_id, const Invite &invite) = 0;
virtual void remove_invite(const std::string &room_id) = 0;
@@ -207,7 +207,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) override;
+ void room_add_new_messages(RoomData *room, const Messages &messages, bool is_initial_sync, bool sync_is_cache) override;
void add_invite(const std::string &room_id, const Invite &invite) override;
void remove_invite(const std::string &room_id) override;
@@ -227,6 +227,7 @@ namespace QuickMedia {
struct RoomMessagesData {
Messages messages;
bool is_initial_sync;
+ bool sync_is_cache;
};
std::map<RoomData*, std::shared_ptr<BodyItem>> room_body_item_by_room;
@@ -464,6 +465,7 @@ namespace QuickMedia {
std::thread sync_thread;
bool sync_running = false;
bool sync_failed = false;
+ bool sync_is_cache = false;
std::string sync_fail_reason;
MatrixDelegate *delegate = nullptr;
};