Fix Bug 31420.
This commit is contained in:
parent
74c000c941
commit
b471b732b1
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue