mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Merge pull request #505 from nextcloud/fixTimSort
try to fix TimSort, but it was just a plain NPE...
This commit is contained in:
commit
0ede6c9127
1 changed files with 8 additions and 2 deletions
|
@ -94,8 +94,14 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
|||
|
||||
@Override
|
||||
public int compare(OCUpload upload1, OCUpload upload2) {
|
||||
if (upload1.getUploadStatus().equals(UploadStatus.UPLOAD_IN_PROGRESS)) {
|
||||
if (!upload2.getUploadStatus().equals(UploadStatus.UPLOAD_IN_PROGRESS)) {
|
||||
if (upload1 == null){
|
||||
return -1;
|
||||
}
|
||||
if (upload2 == null){
|
||||
return 1;
|
||||
}
|
||||
if (UploadStatus.UPLOAD_IN_PROGRESS.equals(upload1.getUploadStatus())) {
|
||||
if (!UploadStatus.UPLOAD_IN_PROGRESS.equals(upload2.getUploadStatus())) {
|
||||
return -1;
|
||||
}
|
||||
// both are in progress
|
||||
|
|
Loading…
Reference in a new issue