diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index 185aaca3..42b52d5b 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -941,7 +941,11 @@ var FileSystemLoaderActions = actions.Actions({ .then(function(){ that.data.clear(res) return res }) - : res }) }], + : res }) + // clear out progress... + .then(function(res){ + logger && rem_logger.emit('done') + return res }) }], // XXX EXPERIMENTAL... diff --git a/ui (gen4)/features/ui-progress.js b/ui (gen4)/features/ui-progress.js index c6f51d05..6e7e829b 100755 --- a/ui (gen4)/features/ui-progress.js +++ b/ui (gen4)/features/ui-progress.js @@ -193,18 +193,23 @@ var ProgressActions = actions.Actions({ 'removed', ] + // close... + // XXX is the right keyword... + if(status == 'done' && rest.length == 0){ + this.showProgress(path, 'close') + // report progress... // XXX HACK -- need meaningful status... - if(add.includes(status)){ - this.showProgress(msg, '+0', '+'+l) + } else if(add.includes(status)){ + this.showProgress(path, '+0', '+'+l) } else if(done.includes(status)){ - this.showProgress(msg, '+'+l) + this.showProgress(path, '+'+l) } else if(skipped.includes(status)){ // XXX if everything is skipped the indicator does not // get hidden... - this.showProgress(msg, '+'+l) + this.showProgress(path, '+'+l) // XXX STUB... } else if(status == 'error' ){ diff --git a/ui (gen4)/imagegrid/file.js b/ui (gen4)/imagegrid/file.js index 336f11b6..c8f07893 100755 --- a/ui (gen4)/imagegrid/file.js +++ b/ui (gen4)/imagegrid/file.js @@ -367,29 +367,23 @@ function(path, index_dir, logger){ getIndexes(path, index_dir, logger) .catch(function(err){ logger && logger.emit('error', err) - console.error(err) - }) + console.error(err) }) .then(function(paths){ // start loading... - return Promise.all(paths.map(function(p){ - p = util.normalizePath(p) - //var path = pathlib.normalize(p +'/'+ index_dir) - var path = util.normalizePath(p +'/'+ index_dir) - return loadSaveHistoryList(path, index_dir) - .then(function(obj){ - // NOTE: considering that all the paths within - // the index are relative to the preview - // dir (the parent dir to the index root) - // we do not need to include the index - // itself in the base path... - res[p] = obj - }) - })) - }) - .then(function(){ resolve(res) }) - } - }) -} + return Promise + .all(paths.map(function(p){ + p = util.normalizePath(p) + //var path = pathlib.normalize(p +'/'+ index_dir) + var path = util.normalizePath(p +'/'+ index_dir) + return loadSaveHistoryList(path, index_dir) + .then(function(obj){ + // NOTE: considering that all the paths within + // the index are relative to the preview + // dir (the parent dir to the index root) + // we do not need to include the index + // itself in the base path... + res[p] = obj }) })) }) + .then(function(){ resolve(res) }) } }) }