|
|
|
@ -166,14 +166,14 @@ MessengerUI, Messages) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var showColors = false;
|
|
|
|
|
var updateUserList = function (toolbar, config) {
|
|
|
|
|
var updateUserList = function (toolbar, config, forceOffline) {
|
|
|
|
|
if (!config.displayed || config.displayed.indexOf('userlist') === -1) { return; }
|
|
|
|
|
// Make sure the elements are displayed
|
|
|
|
|
var $userButtons = toolbar.userlist;
|
|
|
|
|
var $userlistContent = toolbar.userlistContent;
|
|
|
|
|
|
|
|
|
|
var metadataMgr = config.metadataMgr;
|
|
|
|
|
var online = metadataMgr.isConnected();
|
|
|
|
|
var online = !forceOffline && metadataMgr.isConnected();
|
|
|
|
|
var userData = metadataMgr.getMetadata().users;
|
|
|
|
|
var viewers = metadataMgr.getViewers();
|
|
|
|
|
var priv = metadataMgr.getPrivateData();
|
|
|
|
@ -1260,12 +1260,15 @@ MessengerUI, Messages) {
|
|
|
|
|
initClickEvents(toolbar, config);
|
|
|
|
|
initNotifications(toolbar, config);
|
|
|
|
|
|
|
|
|
|
var failed = toolbar.failed = function () {
|
|
|
|
|
var failed = toolbar.failed = function (hideUserList) {
|
|
|
|
|
toolbar.connected = false;
|
|
|
|
|
|
|
|
|
|
if (toolbar.spinner) {
|
|
|
|
|
toolbar.spinner.text(Messages.disconnected);
|
|
|
|
|
}
|
|
|
|
|
if (hideUserList) {
|
|
|
|
|
updateUserList(toolbar, config, true);
|
|
|
|
|
}
|
|
|
|
|
//checkLag(toolbar, config);
|
|
|
|
|
};
|
|
|
|
|
toolbar.initializing = function (/*userId*/) {
|
|
|
|
@ -1312,7 +1315,7 @@ MessengerUI, Messages) {
|
|
|
|
|
toolbar.deleted = function (/*userId*/) {
|
|
|
|
|
toolbar.isErrorState = true;
|
|
|
|
|
toolbar.connected = false;
|
|
|
|
|
updateUserList(toolbar, config);
|
|
|
|
|
updateUserList(toolbar, config, true);
|
|
|
|
|
if (toolbar.spinner) {
|
|
|
|
|
toolbar.spinner.text(Messages.deletedFromServer);
|
|
|
|
|
}
|
|
|
|
|