From 1ea00cfdfa67a798ad7d6dccc1439e31188b4355 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 19 Mar 2020 11:45:17 +0100 Subject: [PATCH] Remove invalid 'DISCONNECTED' message in drive history mode --- www/common/drive-ui.js | 6 ++++-- www/drive/inner.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 50506f248..21e51510e 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -259,12 +259,14 @@ define([ }; // Handle disconnect/reconnect - var setEditable = function (state) { + var setEditable = function (state, isHistory) { if (APP.closed || !APP.$content || !$.contains(document.documentElement, APP.$content[0])) { return; } APP.editable = !APP.readOnly && state; if (!state) { APP.$content.addClass('cp-app-drive-readonly'); - $('#cp-app-drive-connection-state').show(); + if (!isHistory) { + $('#cp-app-drive-connection-state').show(); + } $('[draggable="true"]').attr('draggable', false); } else { diff --git a/www/drive/inner.js b/www/drive/inner.js index f5251f284..720ac562d 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -119,7 +119,7 @@ define([ var setHistory = function (bool, update) { history.isHistoryMode = bool; - setEditable(!bool); + setEditable(!bool, true); if (!bool && update) { history.onLeaveHistory(); }