|
|
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|
|
import com.datarecovery.master.databinding.ItemDataImgBinding;
|
|
|
import com.datarecovery.master.sdk.bugly.BuglyHelper;
|
|
|
import com.datarecovery.master.utils.ImageDeepDetector;
|
|
|
+import com.datarecovery.master.utils.ToastUtil;
|
|
|
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
@@ -60,15 +61,9 @@ public class ImageItemAdapter extends RecyclerView.Adapter<ImageItemAdapter.View
|
|
|
}
|
|
|
|
|
|
public void submit(List<ImageDeepDetector.ImageFile> imageList) {
|
|
|
- if (imageList == null || imageList.isEmpty()) {
|
|
|
+ if (imageList == null) {
|
|
|
return;
|
|
|
}
|
|
|
- Collections.sort(imageList, (o1, o2) -> {
|
|
|
- if (o1 == null || o2 == null) {
|
|
|
- return 0;
|
|
|
- }
|
|
|
- return Long.compare(o1.getLastModified(), o2.getLastModified());
|
|
|
- });
|
|
|
int itemCount;
|
|
|
if (list != null) {
|
|
|
itemCount = imageList.size() - size;
|