settings: Fix real-time update of `full_name` property in page_params.

Previously, if someone updated his/her name from accounts page and closed
the modal and then reopen the modal, the page still had the old name as
we use `page_params.full_name` in `accounts-settings.handlebars`. This
commit fixes this bug.

Fixes: #10529.
This commit is contained in:
Shubham Dhama 2018-09-26 02:04:22 +05:30 committed by Tim Abbott
parent 9dbb5561b1
commit 4126089679
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ exports.update_person = function update(person) {
message_live_update.update_user_full_name(person.user_id, person.full_name); message_live_update.update_user_full_name(person.user_id, person.full_name);
pm_list.update_private_messages(); pm_list.update_private_messages();
if (people.is_my_user_id(person.user_id)) { if (people.is_my_user_id(person.user_id)) {
page_params.full_name = person.full_name;
settings_account.update_full_name(person.full_name); settings_account.update_full_name(person.full_name);
} }
} }