Fix Bug 31420.

This commit is contained in:
Julia Radzhabova 2017-11-24 15:02:52 +03:00
parent 74c000c941
commit b471b732b1

View file

@ -112,7 +112,7 @@ define([
return this; return this;
}, },
onUsersChanged: function(users){ onUsersChanged: function(users, currentUserId){
if (!this.mode.canLicense || !this.mode.canCoAuthoring) { if (!this.mode.canLicense || !this.mode.canCoAuthoring) {
var len = 0; var len = 0;
for (name in users) { for (name in users) {
@ -146,13 +146,14 @@ define([
if (undefined !== name) { if (undefined !== name) {
user = users[name]; user = users[name];
if (user) { if (user) {
arrUsers.push(new Common.Models.User({ var usermodel = new Common.Models.User({
id : user.asc_getId(), id : user.asc_getId(),
username : user.asc_getUserName(), username : user.asc_getUserName(),
online : true, online : true,
color : user.asc_getColor(), color : user.asc_getColor(),
view : user.asc_getView() view : user.asc_getView()
})); });
arrUsers[(user.asc_getId() == currentUserId ) ? 'unshift' : 'push'](usermodel);
} }
} }
} }