aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index a90bb30..d6034de 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -496,7 +496,7 @@ namespace QuickMedia {
for(auto &message : messages) {
if(message->mentions_me) {
// TODO: What if the message or username begins with "-"? also make the notification image be the avatar of the user
- if(!is_window_focused || room != current_room || is_initial_sync || page_type == MatrixPageType::ROOM_LIST)
+ if((!is_window_focused || room != current_room || is_initial_sync || page_type == MatrixPageType::ROOM_LIST) && message->related_event_type != RelatedEventType::EDIT && message->related_event_type != RelatedEventType::REDACTION)
show_notification("QuickMedia matrix - " + matrix->message_get_author_displayname(message.get()) + " (" + room->get_name() + ")", message->body);
}
}
@@ -534,6 +534,7 @@ namespace QuickMedia {
void MatrixRoomsPage::update() {
{
std::lock_guard<std::mutex> lock(mutex);
+ int prev_selected_item = body->get_selected_item();
if(clear_data_on_update) {
clear_data_on_update = false;
body->clear_items();
@@ -555,6 +556,7 @@ namespace QuickMedia {
}
pending_remove_body_items.clear();
+ body->set_selected_item(prev_selected_item, false);
body->clamp_selection();
body->append_items(std::move(room_body_items));
}
@@ -645,6 +647,7 @@ namespace QuickMedia {
void MatrixRoomTagsPage::update() {
{
std::lock_guard<std::recursive_mutex> lock(mutex);
+ int prev_selected_item = body->get_selected_item();
if(clear_data_on_update) {
clear_data_on_update = false;
body->clear_items();
@@ -696,6 +699,7 @@ namespace QuickMedia {
}
}
add_room_body_items_by_tags.clear();
+ body->set_selected_item(prev_selected_item, false);
}
matrix_delegate->update(MatrixPageType::ROOM_LIST);
if(filter_on_update) {
@@ -794,6 +798,7 @@ namespace QuickMedia {
void MatrixInvitesPage::update() {
std::lock_guard<std::mutex> lock(mutex);
+ int prev_selected_item = body->get_selected_item();
if(clear_data_on_update) {
clear_data_on_update = false;
body->clear_items();
@@ -806,6 +811,7 @@ namespace QuickMedia {
remove_body_item_by_url(body->items, room_id);
}
pending_remove_body_items.clear();
+ body->set_selected_item(prev_selected_item, false);
body->clamp_selection();
// TODO: Insert in reverse order (to show the latest invite at the top?)