Commit ae79188a189d4dd3f869d52c08b78dde7c575fe7

Authored by shixianjie
1 parent 4aaa2170c0
Exists in master

去掉自定义排序

app/src/main/java/com/hjx/parent/StuHomeworkActivity.java
... ... @@ -253,9 +253,6 @@ public class StuHomeworkActivity extends BaseRxActivity<ActivityStudentHomeworkB
253 253 .toList()
254 254 .subscribe((data, th) -> {
255 255 if (th != null) th.printStackTrace();
256   - if (data != null) {
257   - Collections.sort(data);
258   - }
259 256 homeworkAdapter.setNewData(data);
260 257 });
261 258 }
... ...
app/src/main/java/com/hjx/parent/fragment/ErrorFragment.java
... ... @@ -290,9 +290,6 @@ public class ErrorFragment extends BaseRxFragment<FragmentErrorBookBinding> {
290 290 .toList()
291 291 .subscribe((data, th) -> {
292 292 if (th != null) th.printStackTrace();
293   - if (data != null) {
294   - Collections.sort(data);
295   - }
296 293 homeworkAdapter.setNewData(data);
297 294 if (binding.tabLayout.getSelectedTabPosition() == 1) {
298 295 binding.rvMain.setVisibility(data == null || data.isEmpty() ? View.GONE : View.VISIBLE);
... ...
libs/common/src/main/java/com/prws/common/bean/homework/HomeworkList.java
... ... @@ -7,7 +7,7 @@ import java.text.SimpleDateFormat;
7 7 import java.util.Date;
8 8 import java.util.Locale;
9 9  
10   -public class HomeworkList implements Comparable<HomeworkList>, Serializable {
  10 +public class HomeworkList implements Serializable {
11 11  
12 12 @SerializedName(value = "homeworkId", alternate = "id")
13 13 private String homeworkId;
... ... @@ -90,13 +90,6 @@ public class HomeworkList implements Comparable&lt;HomeworkList&gt;, Serializable {
90 90 return completeFlag;
91 91 }
92 92  
93   - @Override
94   - public int compareTo(HomeworkList other) {
95   - long time1 = this.uploadTime == null ? 0 : this.uploadTime.getTime();
96   - long time2 = other.uploadTime == null ? 0 : other.uploadTime.getTime();
97   - return (int) (time2 - time1);
98   - }
99   -
100 93 private String time;
101 94 public String getFormatTime() {
102 95 if (uploadTime == null) return "";
... ...