mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Change names in uploads comparator
This commit is contained in:
parent
c0cf6d8788
commit
55a33d8848
1 changed files with 8 additions and 8 deletions
|
@ -92,20 +92,20 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
|||
|
||||
public Comparator<OCUpload> comparator = new Comparator<OCUpload>() {
|
||||
@Override
|
||||
public int compare(OCUpload lhs, OCUpload rhs) {
|
||||
if (lhs.getUploadEndTimestamp() == 0) {
|
||||
return compareUploadId(lhs, rhs);
|
||||
public int compare(OCUpload upload1, OCUpload upload2) {
|
||||
if (upload1.getUploadEndTimestamp() == 0) {
|
||||
return compareUploadId(upload1, upload2);
|
||||
} else {
|
||||
return compareUpdateTime(lhs, rhs);
|
||||
return compareUpdateTime(upload1, upload2);
|
||||
}
|
||||
}
|
||||
|
||||
private int compareUploadId(OCUpload lsh, OCUpload rsh) {
|
||||
return Long.valueOf(lsh.getUploadId()).compareTo(rsh.getUploadId());
|
||||
private int compareUploadId(OCUpload upload1, OCUpload upload2) {
|
||||
return Long.valueOf(upload1.getUploadId()).compareTo(upload2.getUploadId());
|
||||
}
|
||||
|
||||
private int compareUpdateTime(OCUpload lhs, OCUpload rhs) {
|
||||
return Long.valueOf(rhs.getUploadEndTimestamp()).compareTo(lhs.getUploadEndTimestamp());
|
||||
private int compareUpdateTime(OCUpload upload1, OCUpload upload2) {
|
||||
return Long.valueOf(upload2.getUploadEndTimestamp()).compareTo(upload1.getUploadEndTimestamp());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue