diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-08-10 22:06:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-08-10 22:06:52 +0200 |
commit | a64c0d866a510a7e2838d5d6ba6e292f5215f6a3 (patch) | |
tree | 6511296c4b143c00879fcd34776f6aff59feb06a /src | |
parent | 54e09fcd55fcfc460ae1c254dba49c1a8d49b6ea (diff) |
Matrix: fix room description not updating when we send a message
Diffstat (limited to 'src')
-rw-r--r-- | src/DownloadUtils.cpp | 4 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/DownloadUtils.cpp b/src/DownloadUtils.cpp index 17612c6..5f0c547 100644 --- a/src/DownloadUtils.cpp +++ b/src/DownloadUtils.cpp @@ -14,9 +14,9 @@ namespace QuickMedia { struct DownloadUserdata { std::string *header = nullptr; std::string *body = nullptr; - int download_limit = 1024 * 1024 * 100; // 100mb + int64_t download_limit = 1024 * 1024 * 100; // 100mb bool header_finished = false; - int total_downloaded_size = 0; + int64_t total_downloaded_size = 0; }; static int accumulate_string(char *data, int size, void *userdata) { 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) { |