Skip to content

Commit

Permalink
Modified sorting algorithm in class FileInfosRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
Pigcasso committed Dec 9, 2019
1 parent bcf70a2 commit f4737cb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.io.File;
import java.io.FileFilter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

import io.zhuliang.appchooser.internal.Preconditions;
Expand Down Expand Up @@ -51,7 +52,12 @@ public boolean accept(File pathname) {
if (files == null) {
files = new File[0];
}
Arrays.sort(files);
Arrays.sort(files, new Comparator<File>() {
@Override
public int compare(File o1, File o2) {
return o1.getName().compareToIgnoreCase(o2.getName());
}
});
return Observable.from(files);
}
})
Expand Down

0 comments on commit f4737cb

Please sign in to comment.