mirror of
https://github.com/nextcloud/android.git
synced 2024-10-22 20:16:02 +03:00
mix folders and files on sort by date for local folders too
This commit is contained in:
parent
304ab15b51
commit
92d28b8e83
1 changed files with 1 additions and 9 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue