From e6a7ab5dfb146edd11614eb265979d3f763f17e2 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 20 Jan 2021 23:49:01 +0300 Subject: [PATCH] Fix updating guest user name --- apps/documenteditor/main/app/controller/Main.js | 1 + apps/presentationeditor/main/app/controller/Main.js | 1 + apps/spreadsheeteditor/main/app/controller/Main.js | 1 + 3 files changed, 3 insertions(+) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 921226fb2..65eb8a126 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -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)); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index e1e144096..fd8ce609b 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -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)); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index d890cb8ed..95da87451 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -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));