Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: ui/file_manager/file_manager/background/js/media_import_handler.js

Issue 839473006: Files.app: Fix notifications that are popping up after an import has completed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync with master. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/media_import_handler.js
diff --git a/ui/file_manager/file_manager/background/js/media_import_handler.js b/ui/file_manager/file_manager/background/js/media_import_handler.js
index 2220b18dc09aba1a97ec0342f2d3eb201cada142..864c0ff4b79fe6e19b384b7680ffda828deceab5 100644
--- a/ui/file_manager/file_manager/background/js/media_import_handler.js
+++ b/ui/file_manager/file_manager/background/js/media_import_handler.js
@@ -113,9 +113,13 @@ importer.MediaImportHandler.prototype.onTaskProgress_ =
strf('CLOUD_IMPORT_ITEMS_REMAINING', task.remainingFilesCount);
break;
case UpdateType.SUCCESS:
+ item.message = '';
+ item.progressValue = item.progressMax;
item.state = ProgressItemState.COMPLETED;
break;
case UpdateType.ERROR:
+ item.message = '';
+ item.progressValue = item.progressMax;
item.state = ProgressItemState.ERROR;
break;
}
@@ -281,9 +285,9 @@ importer.MediaImportHandler.ImportTask.prototype.importOne_ =
/** @this {importer.MediaImportHandler.ImportTask} */
var onComplete = function() {
- completionCallback();
this.markAsCopied_(entry, destination);
this.notify(importer.TaskQueue.UpdateType.PROGRESS);
+ completionCallback();
};
fileOperationUtil.copyTo(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698