aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-20 00:54:13 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-20 00:54:13 +0200
commitff85dfb6a9b58d6e5a25c614e7aa3e061c6a3e1f (patch)
tree0f93e1efc7577bfa0fc8ab65b55edebddb56b79c /src/QuickMedia.cpp
parent40909b91afb18a1195031e3f570be0c38b58d127 (diff)
List all notifications in notifications page (including the ones we get after starting up qm). This was caused by notifications body being overwritten with cache when navigating to it
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 8fd6b0b..a00f056 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -1674,6 +1674,8 @@ namespace QuickMedia {
if(matrix->did_initial_sync_fail(err_msg)) {
show_notification("QuickMedia", "Initial matrix sync failed, error: " + err_msg, Urgency::CRITICAL);
matrix->logout();
+ delete matrix;
+ matrix = new Matrix();
current_page = PageType::CHAT_LOGIN;
chat_login_page();
after_matrix_login_page();
@@ -6356,6 +6358,8 @@ namespace QuickMedia {
new_page = PageType::CHAT;
matrix->stop_sync();
matrix->logout();
+ delete matrix;
+ matrix = new Matrix();
// TODO: Instead of doing this, exit this current function and navigate to chat login page instead.
//delete current_plugin;
//current_plugin = new Matrix();
@@ -6767,6 +6771,8 @@ namespace QuickMedia {
all_messages.clear();
show_notification("QuickMedia", "Initial matrix sync failed, error: " + err_msg, Urgency::CRITICAL);
matrix->logout();
+ delete matrix;
+ matrix = new Matrix();
current_page = PageType::CHAT_LOGIN;
chat_login_page();
after_matrix_login_page();
@@ -6801,6 +6807,8 @@ namespace QuickMedia {
all_messages.clear();
show_notification("QuickMedia", "Initial matrix sync failed, error: " + err_msg, Urgency::CRITICAL);
matrix->logout();
+ delete matrix;
+ matrix = new Matrix();
current_page = PageType::CHAT_LOGIN;
chat_login_page();
after_matrix_login_page();
@@ -6824,6 +6832,11 @@ namespace QuickMedia {
add_new_messages_to_current_room(all_messages_new);
modify_related_messages_in_current_room(all_messages_new);
unresolved_reactions.clear();
+ after_token.clear();
+ before_token.clear(),
+ fetched_enough_messages_top = false;
+ fetched_enough_messages_bottom = false;
+ fetch_messages_future.cancel();
process_reactions(all_messages_new);
if(current_room->initial_prev_messages_fetch) {
current_room->initial_prev_messages_fetch = false;