Browse Source

mix folders and files on sort by date for local folders too

Andy Scherzinger 8 năm trước cách đây
mục cha
commit
92d28b8e83
1 tập tin đã thay đổi với 1 bổ sung9 xóa
  1. 1 9
      src/com/owncloud/android/utils/FileStorageUtils.java

+ 1 - 9
src/com/owncloud/android/utils/FileStorageUtils.java

@@ -302,15 +302,7 @@ public class FileStorageUtils {
 
         Collections.sort(files, new Comparator<File>() {
             public int compare(File o1, File o2) {
-                if (o1.isDirectory() && o2.isDirectory()) {
-                    Long obj1 = o1.lastModified();
-                    return multiplier * obj1.compareTo(o2.lastModified());
-                }
-                else if (o1.isDirectory()) {
-                    return -1;
-                } else if (o2.isDirectory()) {
-                    return 1;
-                } else if (o1.lastModified() == 0 || o2.lastModified() == 0){
+                if (o1.lastModified() == 0 || o2.lastModified() == 0){
                     return 0;
                 } else {
                     Long obj1 = o1.lastModified();