Chromium Code Reviews| Index: ui/file_manager/file_manager/foreground/js/file_selection.js |
| diff --git a/ui/file_manager/file_manager/foreground/js/file_selection.js b/ui/file_manager/file_manager/foreground/js/file_selection.js |
| index fa7a0529a9dbbf88c8f845c1d62835e6a748c450..df2bc0726fe4ddde1f4ad2a498077bf975e62bf2 100644 |
| --- a/ui/file_manager/file_manager/foreground/js/file_selection.js |
| +++ b/ui/file_manager/file_manager/foreground/js/file_selection.js |
| @@ -180,6 +180,16 @@ FileSelectionHandler.prototype.onFileSelectionChanged = function() { |
| return /** @type {!Entry} */ ( |
| this.fileManager_.getFileList().item(index)); |
| }.bind(this)); |
| + |
| + var isSelectionChanged = (indexes.length !== this.selection.indexes.length); |
| + for (var i = 0; i < indexes.length && !isSelectionChanged; i++) { |
|
hirono
2017/04/21 04:55:03
Sorry one more thing. The selection change like [0
tetsui2
2017/04/21 05:15:35
It's okay to overlook some non-changes unless it's
|
| + if (entries[i].toURL() !== this.selection.entries[i].toURL()) { |
|
fukino
2017/04/21 05:44:31
nit: Let's extract a utility function to compare t
|
| + isSelectionChanged = true; |
| + } |
| + } |
| + if (!isSelectionChanged) { |
| + return; |
| + } |
| this.selection = new FileSelection(indexes, entries); |
| if (this.selectionUpdateTimer_) { |