Browse Source

[버킷리스트][Bug] 태그 요청 순서 맞추기

hyodong.min 6 years ago
parent
commit
713480dce6

+ 5 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/my/bucketlist/BucketListWithTagDetailModel.java

@@ -4,6 +4,7 @@
 package kr.co.zumo.app.lifeplus.view.screen.my.bucketlist;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import io.reactivex.disposables.Disposable;
@@ -174,8 +175,10 @@ public class BucketListWithTagDetailModel extends Model {
     }
     else {
       List<TagTitleBean> list = new ArrayList<>();
-      for (Integer index : tagIndices) {
-        TagBean bean = tags.get(index);
+      Collections.sort(tagIndices); // 태그 순서대로 요청하도록 정렬, 태그 순서가 바뀌면 결과가 다름
+
+      for (int i = 0; i < len; ++i) {
+        TagBean bean = tags.get(tagIndices.get(i));
         list.add(new TagTitleBean(bean.getTagNo(), bean.getTagName()));
       }