Browse Source

[가입][New] 가입 완료/취소 후 재 가입 시도 시 헬퍼 초기화

hyodong.min 7 years ago
parent
commit
e26d8d2fd0

+ 5 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpMobileAuthModel.java

@@ -11,6 +11,7 @@ import kr.co.zumo.app.lifeplus.bean.MobileAuthBean;
 import kr.co.zumo.app.lifeplus.bean.api.LifeplusAPIBean;
 import kr.co.zumo.app.lifeplus.model.Model;
 import kr.co.zumo.app.lifeplus.model.SuperModel;
+import kr.co.zumo.app.lifeplus.util.AppUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 
 /**
@@ -83,8 +84,10 @@ public class SignUpMobileAuthModel extends Model {
     MobileAuthBean mobileAuthBean = event.fromJson(MobileAuthBean.class);
     LifeplusAPIBean resultBean = new Gson().fromJson(event.getString(), LifeplusAPIBean.class);
 
-    Log.w("APP# SignUpMobileAuthPresenter | onEventInternal", "| 인증 결과: " + resultBean.toPrettyJson());
-    Log.w("APP# SignUpMobileAuthPresenter | onEventInternal", "| 유저 데이터: " + mobileAuthBean.toPrettyJson());
+    if (AppUtil.isDebug()) {
+      Log.w("APP# SignUpMobileAuthPresenter | onEventInternal", "| 인증 결과: " + resultBean.toPrettyJson());
+      Log.w("APP# SignUpMobileAuthPresenter | onEventInternal", "| 유저 데이터: " + mobileAuthBean.toPrettyJson());
+    }
 
     /**
      * 2. 성공 시 PROCESS 진입

+ 7 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpModelHelper.java

@@ -25,6 +25,9 @@ public class SignUpModelHelper {
   private static SignUpModelHelper ourInstance = new SignUpModelHelper();
 
   public static SignUpModelHelper getInstance() {
+    if(null == ourInstance) {
+      ourInstance = new SignUpModelHelper();
+    }
     return ourInstance;
   }
 
@@ -90,4 +93,8 @@ public class SignUpModelHelper {
   public void setEncryptedPin(String encryptedPin) {
     this.encryptedPin = encryptedPin;
   }
+
+  public void dispose() {
+    ourInstance = null;
+  }
 }

+ 2 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/signup/SignUpStartModel.java

@@ -26,6 +26,8 @@ public class SignUpStartModel extends Model {
   protected ArrayList<SignUpBannerBean> bannerItems;
 
   public SignUpStartModel() {
+    // 가입 시작 시 헬퍼 초기화
+    SignUpModelHelper.getInstance().dispose();
   }
 
   @Override