aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-10 22:06:52 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-10 22:06:52 +0200
commita64c0d866a510a7e2838d5d6ba6e292f5215f6a3 (patch)
tree6511296c4b143c00879fcd34776f6aff59feb06a /src/plugins
parent54e09fcd55fcfc460ae1c254dba49c1a8d49b6ea (diff)
Matrix: fix room description not updating when we send a message
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index ad30d2d..cb9bd69 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -619,10 +619,11 @@ namespace QuickMedia {
bool set_room_as_unread = !is_window_focused || room != current_room || (!chat_body || chat_body->is_bottom_cut_off()) || (chat_page && !chat_page->messages_tab_visible);
std::string room_desc;
- if(last_unread_message && set_room_as_unread) {
+ if(set_room_as_unread)
room_desc += "Unread: ";
+
+ if(last_unread_message)
room_desc += extract_first_line_remove_newline_elipses(matrix->message_get_author_displayname(last_unread_message), AUTHOR_MAX_LENGTH) + ": " + message_to_room_description_text(last_unread_message);
- }
int unread_notification_count = room->unread_notification_count;
if(unread_notification_count > 0 && set_room_as_unread) {