|
|
@@ -5,11 +5,13 @@ import android.util.Log;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.ContentsDeliveryBean;
|
|
|
+import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.LifeplusContentsBean;
|
|
|
import kr.co.zumo.app.lifeplus.helper.DeliveryHelper;
|
|
|
import kr.co.zumo.app.lifeplus.helper.NavigationBar;
|
|
|
import kr.co.zumo.app.lifeplus.supervisor.ScreenID;
|
|
|
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
+import kr.co.zumo.app.lifeplus.util.StringUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.DoubleChecker;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.ConfirmDialog;
|
|
|
@@ -43,11 +45,27 @@ public class ContentsPresenter extends ContentsBasePresenter<ContentsModel, ICon
|
|
|
}
|
|
|
|
|
|
private void render() {
|
|
|
- view.draw(model.getContentsDetailListBean());
|
|
|
|
|
|
- if (model.getCurrentPageIndex() > 0) {
|
|
|
- view.setScrollToPosition(model.getCurrentPageIndex());
|
|
|
+ // 리스티클 타입인지 구분.
|
|
|
+ ContentsDetailBean contentsDetailBean = model.getFirstItem();
|
|
|
+ if (null != contentsDetailBean) {
|
|
|
+ String itemType = contentsDetailBean.getItemType();
|
|
|
+ if (StringUtil.isFull(itemType) && ContentsDetailBean.ITEM_TYPE_LISTICLE.equalsIgnoreCase(itemType)) {
|
|
|
+ String listType = contentsDetailBean.getListType();
|
|
|
+ view.draw(listType, model.getContentsDetailListBean());
|
|
|
+
|
|
|
+ if (model.getCurrentPageIndex() > 0) {
|
|
|
+ view.setScrollToPosition(model.getCurrentPageIndex());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ showErrorDialog(R.string.undefined_list_type);
|
|
|
+ }
|
|
|
}
|
|
|
+ else {
|
|
|
+ showErrorDialog(R.string.undefined_list_type);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|