Fix autostore popup displayed for dropped files

This commit is contained in:
yflory 2018-09-04 10:36:19 +02:00
parent ee1027ceb9
commit 525703e7d8
2 changed files with 9 additions and 0 deletions

View File

@ -2329,6 +2329,7 @@ define([
UIElements.displayStorePadPopup = function (common, data) { UIElements.displayStorePadPopup = function (common, data) {
if (storePopupState) { return; } if (storePopupState) { return; }
storePopupState = true; storePopupState = true;
if (data && data.stored) { return; } // We won't display the popup for dropped files
var text = Messages.autostore_notstored; var text = Messages.autostore_notstored;
var footer = Messages.autostore_settings; var footer = Messages.autostore_settings;

View File

@ -796,12 +796,20 @@ define([
password: data.password, password: data.password,
path: data.path path: data.path
}, cb); }, cb);
// Let inner know that dropped files shouldn't trigger the popup
postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", {
stored: true
});
return; return;
} }
} else { } else {
sendDriveEvent('DRIVE_CHANGE', { sendDriveEvent('DRIVE_CHANGE', {
path: ['drive', UserObject.FILES_DATA] path: ['drive', UserObject.FILES_DATA]
}, clientId); }, clientId);
// Let inner know that dropped files shouldn't trigger the popup
postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", {
stored: true
});
} }
onSync(cb); onSync(cb);
}; };