|
|
@@ -14,6 +14,7 @@ import com.google.gson.Gson;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.ILifeCycle;
|
|
|
+import kr.co.zumo.app.lifeplus.bean.BucketDeliveryBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.ContentsDeliveryBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.ContentsWebDeliveryBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.UtilityActivityBean;
|
|
|
@@ -39,9 +40,11 @@ import kr.co.zumo.app.lifeplus.view.command.FinishActivityCommand;
|
|
|
import kr.co.zumo.app.lifeplus.view.command.ScreenCommand;
|
|
|
import kr.co.zumo.app.lifeplus.view.custom.Loading;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.AlertDialog;
|
|
|
+import kr.co.zumo.app.lifeplus.view.dialog.ConfirmDialog;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.DialogBase;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.DialogBuilder;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.DialogID;
|
|
|
+import kr.co.zumo.app.lifeplus.view.dialog.ICustomConfirmListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.ICustomDialogListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.PinConfirmDialog;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.main.SystemPopupModelHelper;
|
|
|
@@ -346,27 +349,38 @@ public abstract class Presenter<M extends Model, V extends IView> implements ILi
|
|
|
break;
|
|
|
case ScreenID.BUCKET_ACTIVITY:
|
|
|
model.loadMyBucketCount(event -> {
|
|
|
+ BucketDeliveryBean bucketDeliveryBean = new BucketDeliveryBean();
|
|
|
if (event.getInteger() == 0) {
|
|
|
- utilityActivityBean.setScreenId(ScreenID.BUCKET_BEST);
|
|
|
+ bucketDeliveryBean.setScreenId(ScreenID.BUCKET_BEST);
|
|
|
}
|
|
|
else {
|
|
|
- utilityActivityBean.setScreenId(ScreenID.MY_BUCKET_LIST);
|
|
|
+ bucketDeliveryBean.setScreenId(ScreenID.MY_BUCKET_LIST);
|
|
|
}
|
|
|
- model.setDeliveryPackaging(utilityActivityBean);
|
|
|
- go(ScreenID.UTILITY_ACTIVITY);
|
|
|
+ model.setDeliveryPackaging(bucketDeliveryBean);
|
|
|
+ go(screenId);
|
|
|
});
|
|
|
break;
|
|
|
case ScreenID.SETTING_MEMBER_INFO:
|
|
|
- confirmPin(() -> {
|
|
|
- utilityActivityBean.setScreenId(ScreenID.SETTING_MEMBER_INFO);
|
|
|
- model.setDeliveryPackaging(utilityActivityBean);
|
|
|
- go(ScreenID.UTILITY_ACTIVITY);
|
|
|
- });
|
|
|
+ if (model.isMember()) {
|
|
|
+ confirmPin(() -> {
|
|
|
+ utilityActivityBean.setScreenId(ScreenID.SETTING_MEMBER_INFO);
|
|
|
+ model.setDeliveryPackaging(utilityActivityBean);
|
|
|
+ go(ScreenID.UTILITY_ACTIVITY);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ showPopupForGuest();
|
|
|
+ }
|
|
|
break;
|
|
|
case ScreenID.SETTING_CODE:
|
|
|
- utilityActivityBean.setScreenId(ScreenID.SETTING_CODE);
|
|
|
- model.setDeliveryPackaging(utilityActivityBean);
|
|
|
- go(ScreenID.UTILITY_ACTIVITY);
|
|
|
+ if (model.isMember()) {
|
|
|
+ utilityActivityBean.setScreenId(ScreenID.SETTING_CODE);
|
|
|
+ model.setDeliveryPackaging(utilityActivityBean);
|
|
|
+ go(ScreenID.UTILITY_ACTIVITY);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ showPopupForGuest();
|
|
|
+ }
|
|
|
break;
|
|
|
default:
|
|
|
// 원래 액티비티로 표시되는 화면들.
|
|
|
@@ -440,6 +454,36 @@ public abstract class Presenter<M extends Model, V extends IView> implements ILi
|
|
|
.show();
|
|
|
}
|
|
|
|
|
|
+ /***********************************
|
|
|
+ * Popup for guest
|
|
|
+ ***********************************/
|
|
|
+ protected void showPopupForGuest() {
|
|
|
+ // 비회원 가입 유도
|
|
|
+ new DialogBuilder<ConfirmDialog, ICustomConfirmListener>(getFragmentManager(), DialogID.CONFIRM)
|
|
|
+ .listener(new ICustomConfirmListener<ConfirmDialog>() {
|
|
|
+ @Override
|
|
|
+ public void onPositiveResult(ConfirmDialog dialog, Event event) {
|
|
|
+ dialog.dispose();
|
|
|
+ go(ScreenID.SIGN_UP_START);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onNegativeResult(ConfirmDialog dialog, Event event) {
|
|
|
+ dialog.dispose();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDialogCanceled(ConfirmDialog dialog) {
|
|
|
+ dialog.dispose();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .attribute(dialog -> {
|
|
|
+ dialog.setText(ResourceUtil.getString(R.string.only_user_service));
|
|
|
+ dialog.setPositiveButtonLabelId(R.string.member_confirm);
|
|
|
+ })
|
|
|
+ .show();
|
|
|
+ }
|
|
|
+
|
|
|
/***********************************
|
|
|
* navigation
|
|
|
***********************************/
|