Fix updating guest user name

This commit is contained in:
Julia Radzhabova 2021-01-20 23:49:01 +03:00
parent 3e6090ca71
commit e6a7ab5dfb
3 changed files with 3 additions and 0 deletions

View file

@ -2208,6 +2208,7 @@ define([
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
var name = change.asc_getUserName();
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
this._renameDialog && this._renameDialog.close();
Common.Utils.UserInfoParser.setCurrentName(name);
appHeader.setUserName(Common.Utils.UserInfoParser.getParsedName(name));

View file

@ -1857,6 +1857,7 @@ define([
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
var name = change.asc_getUserName();
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
this._renameDialog && this._renameDialog.close();
Common.Utils.UserInfoParser.setCurrentName(name);
appHeader.setUserName(Common.Utils.UserInfoParser.getParsedName(name));

View file

@ -2217,6 +2217,7 @@ define([
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
var name = change.asc_getUserName();
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
this._renameDialog && this._renameDialog.close();
Common.Utils.UserInfoParser.setCurrentName(name);
this.headerView.setUserName(Common.Utils.UserInfoParser.getParsedName(name));