From f8e1a973744c30a449bdd10062ce7f140889171f Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 23 Mar 2021 12:05:16 +0100 Subject: [PATCH] New message in userlist when pad is destroyed --- www/common/toolbar.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 337b43f5f..172cb9e40 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -213,7 +213,11 @@ MessengerUI, Messages) { .appendTo($editUsers); var degradedLimit = Config.degradedLimit || 8; - if (!online) { + if (toolbar.isDeleted) { + $('').text(Messages.deletedFromServer).appendTo($editUsersList); + numberOfEditUsers = '?'; + numberOfViewUsers = '?'; + } else if (!online) { $('').text(Messages.userlist_offline).appendTo($editUsersList); numberOfEditUsers = '?'; numberOfViewUsers = '?'; @@ -229,7 +233,7 @@ MessengerUI, Messages) { var $spansmall = $('').html(fa_editusers + ' ' + numberOfEditUsers + '   ' + fa_viewusers + ' ' + numberOfViewUsers); $userButtons.find('.cp-dropdown-button-title').html('').append($spansmall); - if (!online) { return; } + if (!online || toolbar.isDeleted) { return; } if (metadataMgr.isDegraded() === true) { return; } @@ -1383,6 +1387,7 @@ MessengerUI, Messages) { toolbar.deleted = function (/*userId*/) { toolbar.isErrorState = true; toolbar.connected = false; + toolbar.isDeleted = true; updateUserList(toolbar, config, true); toolbar.title.toggleClass('cp-toolbar-unsync', true); // "read only" next to the title if (toolbar.spinner) {