mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 02:17:43 +03:00
Also use lambda for sorting
This commit is contained in:
parent
51eab2457d
commit
379c461f33
1 changed files with 1 additions and 4 deletions
|
@ -47,12 +47,9 @@ public class FileSortOrderByDate extends FileSortOrder {
|
|||
public List<OCFile> sortCloudFiles(List<OCFile> files) {
|
||||
final int multiplier = mAscending ? 1 : -1;
|
||||
|
||||
Collections.sort(files, new Comparator<OCFile>() {
|
||||
@SuppressFBWarnings(value = "Bx", justification = "Would require stepping up API level")
|
||||
public int compare(OCFile o1, OCFile o2) {
|
||||
Collections.sort(files, (o1, o2) -> {
|
||||
Long obj1 = o1.getModificationTimestamp();
|
||||
return multiplier * obj1.compareTo(o2.getModificationTimestamp());
|
||||
}
|
||||
});
|
||||
|
||||
return super.sortCloudFiles(files);
|
||||
|
|
Loading…
Reference in a new issue