|
|
@@ -12,6 +12,7 @@ import kr.co.zumo.app.lifeplus.bean.api.EventDetailBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.FlagContentsBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.LifeplusContentsBean;
|
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
+import kr.co.zumo.app.lifeplus.helper.FirebaseAnalyticsHelper;
|
|
|
import kr.co.zumo.app.lifeplus.supervisor.ScreenID;
|
|
|
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.DoubleChecker;
|
|
|
@@ -146,13 +147,20 @@ public abstract class CategoryMainPresenter<M extends CategoryMainModel, V exten
|
|
|
onRequestOrder(event.getIndex());
|
|
|
break;
|
|
|
case Event.RECOMMEND:
|
|
|
+ flagContentsBean = model.getSelectedRecommendBean();
|
|
|
+
|
|
|
+ logContents(
|
|
|
+ FirebaseAnalyticsHelper.Param.TYPE_RECOMMEND,
|
|
|
+ event.getIndex(),
|
|
|
+ flagContentsBean.getTitleWithTrim()
|
|
|
+ );
|
|
|
+
|
|
|
/**
|
|
|
* todo api 수정되면 디테일 로딩 없이 시리즈/디테일 구분
|
|
|
*/
|
|
|
model.setSelectedRecommendedIndex(event.getIndex());
|
|
|
|
|
|
|
|
|
- flagContentsBean = model.getSelectedRecommendBean();
|
|
|
if (getScreenId(flagContentsBean) == ScreenID.EVENT_DETAIL) {
|
|
|
gotoEvent(flagContentsBean);
|
|
|
}
|
|
|
@@ -164,26 +172,10 @@ public abstract class CategoryMainPresenter<M extends CategoryMainModel, V exten
|
|
|
|
|
|
break;
|
|
|
case Event.CONTENTS:
|
|
|
- flagContentsBean = model.getContents().get(event.getIndex());
|
|
|
- if (getScreenId(flagContentsBean) == ScreenID.EVENT_DETAIL) {
|
|
|
- gotoEvent(flagContentsBean);
|
|
|
- }
|
|
|
- else {
|
|
|
- setContentsHelper(flagContentsBean);
|
|
|
-
|
|
|
- go(ScreenID.CONTENTS);
|
|
|
- }
|
|
|
+ linkContents(FirebaseAnalyticsHelper.Param.TYPE_LIST, event.getIndex());
|
|
|
break;
|
|
|
case Event.BANNER:
|
|
|
- flagContentsBean = model.getBannerBeans().get(event.getIndex());
|
|
|
- if (getScreenId(flagContentsBean) == ScreenID.EVENT_DETAIL) {
|
|
|
- gotoEvent(flagContentsBean);
|
|
|
- }
|
|
|
- else {
|
|
|
- setContentsHelper(flagContentsBean);
|
|
|
-
|
|
|
- go(ScreenID.CONTENTS);
|
|
|
- }
|
|
|
+ linkContents(FirebaseAnalyticsHelper.Param.TYPE_BANNER, event.getIndex());
|
|
|
break;
|
|
|
default:
|
|
|
onCategoryEvent(event);
|
|
|
@@ -191,6 +183,30 @@ public abstract class CategoryMainPresenter<M extends CategoryMainModel, V exten
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void linkContents(String type, int index) {
|
|
|
+ FlagContentsBean flagContentsBean = model.getContents().get(index);
|
|
|
+ if (getScreenId(flagContentsBean) == ScreenID.EVENT_DETAIL) {
|
|
|
+ gotoEvent(flagContentsBean);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ logContents(type, index, flagContentsBean.getTitleWithTrim());
|
|
|
+
|
|
|
+ setContentsHelper(flagContentsBean);
|
|
|
+
|
|
|
+ go(ScreenID.CONTENTS);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void logContents(String type, int index, String title) {
|
|
|
+ firebaseAnalyticsHelper.logContents(
|
|
|
+ R.string.fa_screen_category,
|
|
|
+ type,
|
|
|
+ model.getCategoryIndex() + 1,
|
|
|
+ getAnalyticsScreenName(),
|
|
|
+ index + 1,
|
|
|
+ title);
|
|
|
+ }
|
|
|
+
|
|
|
private void gotoEvent(FlagContentsBean flagContentsBean) {
|
|
|
// 이벤트 상세 로딩 후 진행
|
|
|
new EventDetailDelegate().loadEvent(flagContentsBean.getItemNo(), new EventDetailDelegate.IEventDetailDelegateListener() {
|
|
|
@@ -295,6 +311,13 @@ public abstract class CategoryMainPresenter<M extends CategoryMainModel, V exten
|
|
|
|
|
|
@Override
|
|
|
public final void onNavigationClickCategoryTab(ActionBar navigationBar, int index) {
|
|
|
+ firebaseAnalyticsHelper.logCategoryTabMenu(
|
|
|
+ ResourceUtil.getString(R.string.fa_screen_category),
|
|
|
+ model.getCategoryIndex() + 1,
|
|
|
+ getAnalyticsScreenName(),
|
|
|
+ index + 1,
|
|
|
+ ResourceUtil.getString(model.getCategoryNameByIndex(index)));
|
|
|
+
|
|
|
switch (index) {
|
|
|
case 0:
|
|
|
go(ScreenID.FIRST_CATEGORY);
|