settings: Fix live-update bug when changing user names.

When changing name of users, the name was updated corectly
in the "Users", "Deactivated users" and "Bots" list but
it removed the "<a>" element, used to open the user
popover, and instead changed it to plain text.

This commit updates the code to just update the text inside
"<a>" tag so that the popover can still be opened by clicking
on the name.
This commit is contained in:
Sahil Batra 2023-09-22 10:45:40 +05:30 committed by Tim Abbott
parent db86a2e79b
commit 4fb5dee5a4

View File

@ -414,7 +414,7 @@ export function update_user_data(user_id, new_data) {
if (new_data.full_name !== undefined) {
// Update the full name in the table
$user_row.find(".user_name").text(new_data.full_name);
$user_row.find(".user_name .view_user_profile").text(new_data.full_name);
}
if (new_data.role !== undefined) {