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

Unified Diff: ui/file_manager/file_manager/foreground/js/task_controller.js

Issue 2973003002: Revert of Stop updating context menu task items when not changed. (Closed)
Patch Set: Created 3 years, 5 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/foreground/js/task_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/task_controller.js b/ui/file_manager/file_manager/foreground/js/task_controller.js
index c7457d171270354a72faff62ed2170f1e8fde74a..8126570201a14582b44a6b63f40207c61487fe51 100644
--- a/ui/file_manager/file_manager/foreground/js/task_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/task_controller.js
@@ -89,11 +89,6 @@
* @private {Promise<!FileTasks>}
*/
this.tasks_ = null;
-
- /**
- * @private {!Array<!Entry>}
- */
- this.lastSelectedEntries_ = [];
ui.taskMenuButton.addEventListener(
'select', this.onTaskItemClicked_.bind(this));
@@ -272,18 +267,14 @@
// FileSelectionHandler.EventType.CHANGE
if (this.dialogType_ === DialogType.FULL_PAGE &&
(selection.directoryCount > 0 || selection.fileCount > 0)) {
- // Compare entries while ignoring changes inside directories.
- if (!util.isSameEntries(this.lastSelectedEntries_, selection.entries)) {
- // Show disabled items for position calculation of the menu. They will be
- // overridden in this.updateTasks_().
- this.updateContextMenuTaskItems_(
- [TaskController.createTemporaryDisabledTaskItem_()]);
- }
+ // Show disabled items for position calculation of the menu. They will be
+ // overridden in this.updateFileSelectionAsync().
+ this.updateContextMenuTaskItems_(
+ [TaskController.createTemporaryDisabledTaskItem_()]);
} else {
// Update context menu.
this.updateContextMenuTaskItems_([]);
}
- this.lastSelectedEntries_ = selection.entries;
};
/**
« 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