diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 2 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index fdaf3d1..a7933d9 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3280,6 +3280,8 @@ namespace QuickMedia { tabs[PINNED_TAB_INDEX].body->select_last_item(); else tabs[PINNED_TAB_INDEX].body->set_selected_item(selected_before); + + tabs[PINNED_TAB_INDEX].text.setString("Pinned messages (" + std::to_string(tabs[PINNED_TAB_INDEX].body->items.size()) + ")"); }; Body url_selection_body(this, loading_icon); diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 9a64bda..a90bb30 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1779,7 +1779,12 @@ namespace QuickMedia { const rapidjson::Value &new_avatar_url_json = GetMember(*content_json, "avatar_url"); if(new_displayname_json.IsString() && (!prev_displayname_json.IsString() || strcmp(new_displayname_json.GetString(), prev_displayname_json.GetString()) != 0)) { std::string new_displayname_str = std::string(new_displayname_json.GetString()); - body = user_display_name + " changed their display name to " + new_displayname_str; + std::string prev_displayname_str; + if(prev_displayname_json.IsString()) + prev_displayname_str = std::string(prev_displayname_json.GetString(), prev_displayname_json.GetStringLength()); + else + prev_displayname_str = sender_json_str; + body = prev_displayname_str + " changed their display name to " + new_displayname_str; room_data->set_user_display_name(user, std::move(new_displayname_str)); } else if(!new_displayname_json.IsString() && prev_displayname_json.IsString()) { body = user_display_name + " removed their display name"; |