|
|
@@ -32,6 +32,7 @@ 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.ICustomDialogListener;
|
|
|
+import kr.co.zumo.app.lifeplus.view.dialog.PinConfirmDialog;
|
|
|
import kr.co.zumo.app.lifeplus.view.presenter.Presenter;
|
|
|
|
|
|
/**
|
|
|
@@ -52,7 +53,7 @@ public class SettingPresenter extends Presenter<SettingModel, ISettingView> {
|
|
|
public static final int SETTING_INFO = 3;
|
|
|
public static final int SETTING_UPDATE = 4;
|
|
|
|
|
|
- private DialogBase shareDialog;
|
|
|
+ private DialogBase alertDialog;
|
|
|
private Share share;
|
|
|
private boolean isEnabled = false;
|
|
|
|
|
|
@@ -172,7 +173,43 @@ public class SettingPresenter extends Presenter<SettingModel, ISettingView> {
|
|
|
if (index == SettingViewHolder.MEMBER_CONFIRM) {
|
|
|
// 회원 관리/확인
|
|
|
if (model.isMember()) {
|
|
|
- go(ScreenID.SETTING_MEMBER_INFO);
|
|
|
+ // PinConfirmDialog
|
|
|
+ alertDialog = new DialogBuilder<PinConfirmDialog, ICustomDialogListener>(DialogID.PIN_CONFIRM)
|
|
|
+ .listener(new ICustomDialogListener<PinConfirmDialog>() {
|
|
|
+ @Override
|
|
|
+ public void onDialogResult(PinConfirmDialog dialog, Event event) {
|
|
|
+ switch (event.getEventId()) {
|
|
|
+ case Event.CONFIRM:
|
|
|
+ String inputPin = event.getString();
|
|
|
+ if (model.verifyPin(inputPin)) {
|
|
|
+ dialog.dispose();
|
|
|
+ go(ScreenID.SETTING_MEMBER_INFO);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ dialog.retry();
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+ case Event.FAIL:
|
|
|
+ dialog.dispose();
|
|
|
+ // 핀 불일치
|
|
|
+ showErrorDialog(R.string.pin_miss_match_error);
|
|
|
+ break;
|
|
|
+ case Event.HELP:
|
|
|
+ // 이메일 문의
|
|
|
+ onCommand(new EmailSendingCommand(ResourceUtil.getString(R.string.lifeplus_email)));
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ dialog.dispose();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDialogCanceled(PinConfirmDialog dialog) {
|
|
|
+ dialog.dispose();
|
|
|
+ }
|
|
|
+ }).show();
|
|
|
}
|
|
|
else {
|
|
|
go(ScreenID.SIGN_UP_START);
|
|
|
@@ -188,7 +225,7 @@ public class SettingPresenter extends Presenter<SettingModel, ISettingView> {
|
|
|
if (StringUtil.isFull(code)) {
|
|
|
//onCommand(new TextShareCommand(code));
|
|
|
//추천 팝업 띄우기
|
|
|
- shareDialog = new DialogBuilder<CurrentPageShareDialog, ICustomDialogListener>(DialogID.SHARE)
|
|
|
+ alertDialog = new DialogBuilder<CurrentPageShareDialog, ICustomDialogListener>(DialogID.SHARE)
|
|
|
.listener(new ICustomDialogListener<CurrentPageShareDialog>() {
|
|
|
@Override
|
|
|
public void onDialogResult(CurrentPageShareDialog dialog, Event event) {
|