mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
try to fix timSort error
This commit is contained in:
parent
7525088db2
commit
b346d7bdc1
2 changed files with 5 additions and 5 deletions
|
@ -113,16 +113,16 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
|||
if (upload1.getUploadEndTimestamp() == 0 || upload2.getUploadEndTimestamp() == 0) {
|
||||
return compareUploadId(upload1, upload2);
|
||||
} else {
|
||||
return compareUpdateTime(upload1, upload2);
|
||||
return compareUpdateTime(upload1, upload2);
|
||||
}
|
||||
}
|
||||
|
||||
private int compareUploadId(OCUpload upload1, OCUpload upload2) {
|
||||
return Long.valueOf(upload1.getUploadId()).compareTo(upload2.getUploadId());
|
||||
return Long.compare(upload1.getUploadId(), upload2.getUploadId());
|
||||
}
|
||||
|
||||
private int compareUpdateTime(OCUpload upload1, OCUpload upload2) {
|
||||
return Long.valueOf(upload2.getUploadEndTimestamp()).compareTo(upload1.getUploadEndTimestamp());
|
||||
return Long.compare(upload2.getUploadEndTimestamp(), upload1.getUploadEndTimestamp());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ public class FileStorageUtils {
|
|||
public int compare(OCFile o1, OCFile o2) {
|
||||
if (o1.isFolder() && o2.isFolder()) {
|
||||
Long obj1 = o1.getFileLength();
|
||||
return multiplier * obj1.compareTo(o2.getFileLength());
|
||||
return multiplier * obj1., o2.getFileLength());
|
||||
}
|
||||
else if (o1.isFolder()) {
|
||||
return -1;
|
||||
|
@ -337,7 +337,7 @@ public class FileStorageUtils {
|
|||
return 0;
|
||||
} else {
|
||||
Long obj1 = o1.getFileLength();
|
||||
return multiplier * obj1.compareTo(o2.getFileLength());
|
||||
return multiplier * Long.compare(obj1, o2.getFileLength());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue