don't confirm if not needed

pull/1/head
yann300 7 years ago
parent c8ed134f7d
commit 69aea682b5
  1. 8
      src/app/files/chromeCloudStorageSync.js

@ -19,10 +19,13 @@ module.exports = function (filesProviders) {
modalDialogCustom.confirm('', 'Overwrite "' + key + '"? Click Ok to overwrite local file with file from cloud. Cancel will push your local file to the cloud.', () => { callback(true) }, () => { callback(false) })
}
confirmDialog(function (theResult) {
if (typeof resp[key] !== 'undefined' && obj[key] !== resp[key] && theResult) {
if (typeof resp[key] !== 'undefined' && obj[key] !== resp[key]) {
confirmDialog((result) => {
if (result) {
console.log('Overwriting', key)
filesProviders['browser'].set(key, resp[key])
}
})
} else {
console.log('add to obj', obj, key)
filesProviders['browser'].get(key, (error, content) => {
@ -33,7 +36,6 @@ module.exports = function (filesProviders) {
}
})
}
})
done++
if (done >= count) {

Loading…
Cancel
Save