diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 20d57fd07..32ef8ed41 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -213,10 +213,6 @@ define([ evStart.reg(function () { toolbar.forgotten(); }); break; } - case STATE.FORBIDDEN: { - evStart.reg(function () { toolbar.deleted(); }); - break; - } case STATE.DELETED: { evStart.reg(function () { toolbar.deleted(); }); break; diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 172cb9e40..e034304f7 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -546,6 +546,9 @@ MessengerUI, Messages) { hidden: true }); $shareBlock.click(function () { + if (toolbar.isDeleted) { + return void UI.warn(Messages.deletedFromServer); + } var title = (config.title && config.title.getTitle && config.title.getTitle()) || (config.title && config.title.defaultName) || ""; @@ -569,6 +572,9 @@ MessengerUI, Messages) { h('span.cp-button-name', Messages.accessButton) ])); $accessBlock.click(function () { + if (toolbar.isDeleted) { + return void UI.warn(Messages.deletedFromServer); + } var title = (config.title && config.title.getTitle && config.title.getTitle()) || (config.title && config.title.defaultName) || "";