|
|
@@ -5,13 +5,10 @@ import android.util.Log;
|
|
|
|
|
|
import kr.co.zumo.app.lifeplus.bean.EventDeliveryBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.EventDetailBean;
|
|
|
-import kr.co.zumo.app.lifeplus.bean.api.EventQuestionBean;
|
|
|
import kr.co.zumo.app.lifeplus.helper.DeliveryHelper;
|
|
|
import kr.co.zumo.app.lifeplus.supervisor.ActivityDeliveryHelper;
|
|
|
-import kr.co.zumo.app.lifeplus.supervisor.ScreenID;
|
|
|
-import kr.co.zumo.app.lifeplus.view.IWaiterCallable;
|
|
|
import kr.co.zumo.app.lifeplus.view.ToastProvider;
|
|
|
-import kr.co.zumo.app.lifeplus.view.animation.Loading;
|
|
|
+import kr.co.zumo.app.lifeplus.view.screen.event.EventDetailDelegate;
|
|
|
|
|
|
/**
|
|
|
* EventRecommendActivity
|
|
|
@@ -23,44 +20,13 @@ import kr.co.zumo.app.lifeplus.view.animation.Loading;
|
|
|
* @history 하세미 [2019-01-04] [최초 작성]
|
|
|
* @since 2019-01-04
|
|
|
*/
|
|
|
-public class EventRecommendActivity extends ActivityBaseScreen implements IWaiterCallable {
|
|
|
+public class EventRecommendActivity extends ActivityBaseScreen {
|
|
|
@Override
|
|
|
protected void render() {
|
|
|
ActivityDeliveryHelper.getInstance().shipTo(getHelper(DeliveryHelper.class));
|
|
|
EventDeliveryBean eventDeliveryBean = getHelper(DeliveryHelper.class).getPackaging(EventDeliveryBean.class);
|
|
|
if (null != eventDeliveryBean) {
|
|
|
|
|
|
- /*
|
|
|
-
|
|
|
- 리스트 타입을 알려면? => EventDetailBean
|
|
|
-
|
|
|
- - 처음 진입 시
|
|
|
- :기본형
|
|
|
- => EventDetailBean 이 배달되면 = 참여 직후 -> <연관 컨텐츠 로드>
|
|
|
- => eventNo(String) 이 배달되면 = 참여 이후 -> 디테일 로드 -> 참여 결과 로드 -> <연관 컨텐츠 로드>
|
|
|
-
|
|
|
- :태그형
|
|
|
- => EventDetailBean 이 배달되면 = 참여 직후 -> <tag 로드 -> 연관 컨텐츠 로드>
|
|
|
- => eventNo(String) 이 배달되면 = 참여 이후 -> 디테일 로드 -> 참여 결과 로드 -> <tag 로드 -> 연관 컨텐츠 로드>
|
|
|
-
|
|
|
- */
|
|
|
-
|
|
|
- // 태그 형 필요 아이템
|
|
|
- /*
|
|
|
- 제목, 서브제목, 배경 그림 => EventDetailBean
|
|
|
-
|
|
|
- 항목 선택 여부 (answerNo)
|
|
|
- - 참여 직후 => EventDetailBean
|
|
|
- - 참여 이후 => 참여 결과 API Bean
|
|
|
- */
|
|
|
-
|
|
|
- // 기본 형
|
|
|
- /*
|
|
|
- 선택한 항목 (answerNo)
|
|
|
- - 참여 직후 => EventDetailBean
|
|
|
- - 참여 이후 => 참여 결과 API Bean
|
|
|
- */
|
|
|
-
|
|
|
// 이벤트 타입이 없는 경우 (via push message ...) 이벤트 데이터를 로드해서 파악한다.
|
|
|
if (null != eventDeliveryBean.getEventDetailBean()) {
|
|
|
launchScreenInternal(eventDeliveryBean.getEventDetailBean());
|
|
|
@@ -83,58 +49,7 @@ public class EventRecommendActivity extends ActivityBaseScreen implements IWaite
|
|
|
}
|
|
|
|
|
|
private void launchScreenInternal(EventDetailBean eventDetailBean) {
|
|
|
- int id = ScreenID.NONE;
|
|
|
-
|
|
|
- // fixme 질문 수를 기준으로 강제 타입 변경하면 기본형 질문에 없는 태그를 요구하기 때문에 tag list 결과값이 없다.
|
|
|
-// if (eventDetailBean.isSimpleQuestion()) {
|
|
|
- // 질문 수 1 -> 타입 구분
|
|
|
- String questionType = eventDetailBean.getEventQuestionList().get(0).getQuestionType();
|
|
|
- if (EventQuestionBean.QUESTION_TYPE_RECOMMEND_TAG.equals(questionType)) {
|
|
|
- // 기본형
|
|
|
- id = ScreenID.EVENT_RECOMMEND_TAG;
|
|
|
- }
|
|
|
- else if (EventQuestionBean.QUESTION_TYPE_RECOMMEND_BASIC.equals(questionType)) {
|
|
|
- // 태그형
|
|
|
- id = ScreenID.EVENT_RECOMMEND_BASIC;
|
|
|
- }
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// // 질문 수 2 -> 태그형 고정
|
|
|
-// id = ScreenID.EVENT_RECOMMEND_TAG;
|
|
|
-// }
|
|
|
-
|
|
|
- if (id != ScreenID.NONE) {
|
|
|
- launchScreen(id);
|
|
|
- }
|
|
|
- else {
|
|
|
- // fixme question type
|
|
|
- id = ScreenID.EVENT_RECOMMEND_BASIC;
|
|
|
- launchScreen(id);
|
|
|
-// Log.e("APP# EventRecommendActivity | launchScreenInternal", "|" + " QuestionType is " + questionType + ". but, need 05 or 06");
|
|
|
-// ToastProvider.showNative("QuestionType is " + questionType + ". but, need 05 or 06");
|
|
|
-// finish();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /***********************************
|
|
|
- * IWaiterCallable
|
|
|
- ***********************************/
|
|
|
- private Loading waiter;
|
|
|
-
|
|
|
- @Override
|
|
|
- public void showWaiter() {
|
|
|
- if (null == waiter) {
|
|
|
- waiter = new Loading(this, 300);
|
|
|
- waiter.show();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void hideWaiter() {
|
|
|
- if (null != waiter) {
|
|
|
- waiter.hide();
|
|
|
- waiter = null;
|
|
|
- }
|
|
|
+ launchScreen(EventDetailDelegate.getRecommendScreenIdByType(eventDetailBean));
|
|
|
}
|
|
|
|
|
|
@Override
|