Change names in uploads comparator

This commit is contained in:
masensio 2016-02-26 13:50:24 +01:00
parent c0cf6d8788
commit 55a33d8848

View file

@ -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());
}
};