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

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

Issue 479503002: Files.app: Not use URL in sorting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the comment Created 6 years, 4 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
Index: ui/file_manager/file_manager/foreground/js/directory_tree.js
diff --git a/ui/file_manager/file_manager/foreground/js/directory_tree.js b/ui/file_manager/file_manager/foreground/js/directory_tree.js
index 8fe829e2e84b5f59a4846998f2c60f2fda973fd6..6c48f2aa220d82dc00c497178776caf6ea6eda19 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_tree.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_tree.js
@@ -279,9 +279,7 @@ DirectoryItem.prototype.updateSubDirectories = function(
}
var sortEntries = function(fileFilter, entries) {
- entries.sort(function(a, b) {
- return (a.name.toLowerCase() > b.name.toLowerCase()) ? 1 : -1;
- });
+ entries.sort(util.compareName);
return entries.filter(fileFilter.filter.bind(fileFilter));
};
@@ -514,6 +512,7 @@ VolumeItem.prototype.updateSubDirectories = function(recursive) {
for (var key in this.volumeInfo.fakeEntries)
entries.push(this.volumeInfo.fakeEntries[key]);
}
+ // This list is sorted by URL on purpose.
entries.sort(function(a, b) { return a.toURL() < b.toURL(); });
for (var i = 0; i < entries.length; i++) {

Powered by Google App Engine
This is Rietveld 408576698