ソースを参照

Fixed comparator - upload really in progress now REALLY on the top

David A. Velasco 9 年 前
コミット
ae67c0c878

+ 3 - 4
src/com/owncloud/android/ui/adapter/ExpandableUploadListAdapter.java

@@ -20,7 +20,6 @@
 package com.owncloud.android.ui.adapter;
 
 import android.content.Context;
-import android.content.Intent;
 import android.database.DataSetObserver;
 import android.graphics.Bitmap;
 import android.text.format.DateUtils;
@@ -98,7 +97,7 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
                         if (binder.isUploadingNow(upload1)) {
                             return -1;
                         } else if (binder.isUploadingNow(upload2)) {
-                            return -1;
+                            return 1;
                         }
                     }
                 }
@@ -175,8 +174,8 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
 
 
     private OCUpload[] trimToMaxLength(OCUpload[] items) {
-        if (items.length > 30) {
-            OCUpload[] arrayTrim = new OCUpload[30];
+        if (items.length > MAX_NUM_UPLOADS_SHOWN) {
+            OCUpload[] arrayTrim = new OCUpload[MAX_NUM_UPLOADS_SHOWN];
 
             for (int i = 0; i < MAX_NUM_UPLOADS_SHOWN; i++) {
                 arrayTrim[i] = items[i];