|
|
@@ -182,19 +182,21 @@ public class MainModel extends CoinModel {
|
|
|
if (null != popupInfoListBean) {
|
|
|
promotionPopupBeans = popupInfoListBean.getPromotionPopupList();
|
|
|
|
|
|
- Collections.sort(promotionPopupBeans, new Comparator<PromotionPopupBean>() {
|
|
|
- @Override
|
|
|
- public int compare(PromotionPopupBean promotionPopupBean, PromotionPopupBean t1) {
|
|
|
- if (Integer.parseInt(promotionPopupBean.getOrderSeqNo()) < Integer.parseInt(t1.getOrderSeqNo())) {
|
|
|
- return -1;
|
|
|
+ if (null != promotionPopupBeans) {
|
|
|
+ Collections.sort(promotionPopupBeans, new Comparator<PromotionPopupBean>() {
|
|
|
+ @Override
|
|
|
+ public int compare(PromotionPopupBean promotionPopupBean, PromotionPopupBean t1) {
|
|
|
+ if (Integer.parseInt(promotionPopupBean.getOrderSeqNo()) < Integer.parseInt(t1.getOrderSeqNo())) {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else if (Integer.parseInt(promotionPopupBean.getOrderSeqNo()) > Integer.parseInt(t1.getOrderSeqNo())) {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
}
|
|
|
- else if (Integer.parseInt(promotionPopupBean.getOrderSeqNo()) > Integer.parseInt(t1.getOrderSeqNo())) {
|
|
|
- return 1;
|
|
|
- }
|
|
|
- return 0;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
SystemPopupModelHelper.getInstance().setSystemPopupBeans(popupInfoListBean.getSystemPopupList());
|
|
|
}
|
|
|
|
|
|
@@ -211,9 +213,7 @@ public class MainModel extends CoinModel {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- else
|
|
|
-
|
|
|
- {
|
|
|
+ else {
|
|
|
SystemPopupModelHelper.getInstance().setAvailableRefresh();
|
|
|
promotionPopupBeans = SystemPopupModelHelper.getInstance().getPromotionPopupBeans();
|
|
|
onResult(new Event.Builder(Event.SUCCESS).integer(Event.LOADED_POPUP_INFO).build());
|