From e3db9dc59a3054282c5e283e44b24e9fbab0f876 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 23 Mar 2021 16:52:20 +0100 Subject: [PATCH] Don't open access or share modals for deleted pads --- www/common/sframe-app-framework.js | 4 ---- www/common/toolbar.js | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) 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) || "";