|
|
@@ -15,7 +15,6 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.DoubleChecker;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.command.FragmentChangeCommand;
|
|
|
-import kr.co.zumo.app.lifeplus.view.dialog.ConfirmDialog;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.CustomAlertDialog;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.DialogBase;
|
|
|
import kr.co.zumo.app.lifeplus.view.dialog.DialogBuilder;
|
|
|
@@ -39,7 +38,6 @@ public class SignUpAgreePresenter extends Presenter<SignUpAgreeModel, ISignUpAgr
|
|
|
|
|
|
protected boolean isValidated = false;
|
|
|
protected boolean isSaved = false;
|
|
|
- DialogBase alertDialog;
|
|
|
Disposable disposable;
|
|
|
private DoubleChecker doubleChecker;
|
|
|
|
|
|
@@ -75,11 +73,6 @@ public class SignUpAgreePresenter extends Presenter<SignUpAgreeModel, ISignUpAgr
|
|
|
protected void destroyInternal() {
|
|
|
model.stopPolicyRequest();
|
|
|
|
|
|
- if (null != alertDialog) {
|
|
|
- alertDialog.dispose();
|
|
|
- alertDialog = null;
|
|
|
- }
|
|
|
-
|
|
|
if (null != disposable) {
|
|
|
disposable.dispose();
|
|
|
disposable = null;
|
|
|
@@ -117,16 +110,16 @@ public class SignUpAgreePresenter extends Presenter<SignUpAgreeModel, ISignUpAgr
|
|
|
break;
|
|
|
case Event.ERROR:
|
|
|
if (event.getInteger() == Event.POLICY_REQUEST) {
|
|
|
- showErrorPopup(event.getString());
|
|
|
+ showErrorDialog(event.getString());
|
|
|
}
|
|
|
else if (event.getInteger() == Event.POLICY_CONFIRM) {
|
|
|
- showErrorPopup(event.getString());
|
|
|
+ showErrorDialog(event.getString());
|
|
|
}
|
|
|
else if (event.getInteger() == Event.MEMBER_JOIN) {
|
|
|
- showErrorPopup(event.getString());
|
|
|
+ showErrorDialog(event.getString());
|
|
|
}
|
|
|
else if (event.getInteger() == Event.MEMBER_LOGIN) {
|
|
|
- showErrorPopup(event.getString());
|
|
|
+ showErrorDialog(event.getString());
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
@@ -147,7 +140,7 @@ public class SignUpAgreePresenter extends Presenter<SignUpAgreeModel, ISignUpAgr
|
|
|
onCommand(new FragmentChangeCommand(ScreenID.REST_MEMBER_START, ScreenID.DIRECTION_NEXT));
|
|
|
}
|
|
|
else if (SuperModel.getInstance().isOutMember()) {
|
|
|
- showErrorPopup("탈퇴한 회원입니다.");
|
|
|
+ showErrorDialog("탈퇴한 회원입니다.");
|
|
|
}
|
|
|
else {
|
|
|
// 정상
|
|
|
@@ -155,28 +148,6 @@ public class SignUpAgreePresenter extends Presenter<SignUpAgreeModel, ISignUpAgr
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void showErrorPopup(String errorMessage) {
|
|
|
-
|
|
|
- alertDialog = DialogBuilder.create(DialogID.CONFIRM)
|
|
|
- .listener(new IDialogResultListener() {
|
|
|
- @Override
|
|
|
- public void onDialogResult(DialogBase dialog, Event event) {
|
|
|
- if (event.getEventId() == Event.CONFIRM) {
|
|
|
- dialog.dispose();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onDialogCanceled(DialogBase dialog) {
|
|
|
- dialog.dispose();
|
|
|
- }
|
|
|
- })
|
|
|
- .attribute((IAttribute<ConfirmDialog>) dialog -> {
|
|
|
- dialog.setText(errorMessage);
|
|
|
- })
|
|
|
- .show();
|
|
|
- }
|
|
|
-
|
|
|
private void renderAfterReady() {
|
|
|
view.init(getAgreeItems());
|
|
|
}
|