فهرست منبع

[공통][Common] 회원확인 얼랏 공통 정의대로 수정

Hasemi 7 سال پیش
والد
کامیت
e76763c80a

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/dialog/CustomAlertDialog.java

@@ -30,7 +30,7 @@ public class CustomAlertDialog extends TextDialog {
     // Use the Builder class for convenient dialog construction
     AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
     builder.setMessage(text)
-      .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+      .setPositiveButton(R.string.member_confirm, new DialogInterface.OnClickListener() {
         public void onClick(DialogInterface dialog, int id) {
           if (null != getCustomListener()) {
             getCustomListener().onDialogResult(CustomAlertDialog.this, new Event.Builder(Event.CONFIRM).build());

+ 27 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsPresenter.java

@@ -29,6 +29,7 @@ import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.command.EmailSendingCommand;
 import kr.co.zumo.app.lifeplus.view.dialog.AppReviewDialog;
 import kr.co.zumo.app.lifeplus.view.dialog.CurrentPageShareDialog;
+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;
 import kr.co.zumo.app.lifeplus.view.dialog.DialogID;
@@ -192,7 +193,7 @@ public class ContentsPresenter extends Presenter<ContentsModel, IContentsView> {
       model.updateLiked();
     }
     else {
-      showErrorDialog(R.string.best_bucket_guest_guide);
+      showPopupForGuest();
     }
   }
 
@@ -206,7 +207,7 @@ public class ContentsPresenter extends Presenter<ContentsModel, IContentsView> {
       model.updateBookmarked();
     }
     else {
-      showErrorDialog(R.string.best_bucket_guest_guide);
+      showPopupForGuest();
     }
   }
 
@@ -332,4 +333,28 @@ public class ContentsPresenter extends Presenter<ContentsModel, IContentsView> {
     toast.setView(view);
     toast.show();
   }
+
+  private void showPopupForGuest() {
+    // 비회원 가입 유도
+    new DialogBuilder<CustomAlertDialog, ICustomDialogListener>(getFragmentManager(), DialogID.ALERT)
+      .listener(new ICustomDialogListener<CustomAlertDialog>() {
+        @Override
+        public void onDialogResult(CustomAlertDialog dialog, Event event) {
+          if (event.getEventId() == Event.CONFIRM) {
+            dialog.dispose();
+            go(ScreenID.SIGN_UP_START);
+          }
+        }
+
+        @Override
+        public void onDialogCanceled(CustomAlertDialog dialog) {
+          dialog.dispose();
+        }
+      })
+      .attribute(dialog -> {
+        dialog.setText(ResourceUtil.getString(R.string.best_bucket_guest_guide));
+      })
+      .show();
+  }
+
 }

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -654,7 +654,7 @@
   <string name="app_join_recommend">\n회원가입하시면 특별한 혜택을 드립니다.</string>
   <string name="recommend_code_title">추천인코드</string>
 
-  <string name="best_bucket_guest_guide">서비스 이용을 위해서 Lifeplus 회원 확인이 필요합니다.</string>
+  <string name="best_bucket_guest_guide">서비스 이용을 위해서 Lifeplus app 회원 확인이 필요합니다.</string>
   <string name="best_bucket_delete_guide">선택된 버킷리스트가 삭제됩니다.</string>
 
   <string name="inside">실내</string>