From 525703e7d85c6458d7ba9fccb1d3b689c7d380b2 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 4 Sep 2018 10:36:19 +0200 Subject: [PATCH] Fix autostore popup displayed for dropped files --- www/common/common-ui-elements.js | 1 + www/common/outer/async-store.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 2d2d641cd..3f75d3369 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -2329,6 +2329,7 @@ define([ UIElements.displayStorePadPopup = function (common, data) { if (storePopupState) { return; } storePopupState = true; + if (data && data.stored) { return; } // We won't display the popup for dropped files var text = Messages.autostore_notstored; var footer = Messages.autostore_settings; diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index bb94b1e75..2be4ded4f 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -796,12 +796,20 @@ define([ password: data.password, path: data.path }, cb); + // Let inner know that dropped files shouldn't trigger the popup + postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", { + stored: true + }); return; } } else { sendDriveEvent('DRIVE_CHANGE', { path: ['drive', UserObject.FILES_DATA] }, clientId); + // Let inner know that dropped files shouldn't trigger the popup + postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", { + stored: true + }); } onSync(cb); };