Преглед изворни кода

HUE-7625 [assist] Sort the folders in the documents panel and home by name

Johan Ahlen пре 8 година
родитељ
комит
6824568bcf
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      desktop/core/src/desktop/static/desktop/js/document/hueFileEntry.js

+ 3 - 0
desktop/core/src/desktop/static/desktop/js/document/hueFileEntry.js

@@ -26,6 +26,9 @@ var HueFileEntry = (function () {
       if (!a.isDirectory() && b.isDirectory()) {
         return 1;
       }
+      if (a.isDirectory() && b.isDirectory()) {
+        return sorts.nameAsc(a, b);
+      }
       return sorts.lastModifiedDesc(a, b);
     },
     nameAsc: function (a, b) {