aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
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;