Browse Source

[공통][Bug] 불필요 메서드 제거

hyodong.min 7 years ago
parent
commit
9d6c094d1a

+ 0 - 10
app/src/main/java/kr/co/zumo/app/lifeplus/view/command/AppUpdateCommand.java

@@ -27,11 +27,6 @@ public class AppUpdateCommand extends Command<Model, IView, Presenter> {
     this.appId = appId;
   }
 
-  @Override
-  public void preExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void execute(Model model, IView view, Presenter presenter) {
     Intent intent = new Intent();
@@ -39,11 +34,6 @@ public class AppUpdateCommand extends Command<Model, IView, Presenter> {
     view.getActivity().startActivity(intent);
   }
 
-  @Override
-  public void postExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void dispose() {
 

+ 0 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/command/Command.java

@@ -18,9 +18,7 @@ import kr.co.zumo.app.lifeplus.view.presenter.Presenter;
  * @since 2018. 9. 21.
  */
 public abstract class Command<M extends Model, V extends IView, P extends Presenter> {
-  public abstract void preExecute(M model, V view, P presenter);
   public abstract void execute(M model, V view, P presenter);
-  public abstract void postExecute(M model, V view, P presenter);
 
   public abstract void dispose();
 }

+ 0 - 10
app/src/main/java/kr/co/zumo/app/lifeplus/view/command/EmailSendingCommand.java

@@ -38,11 +38,6 @@ public class EmailSendingCommand extends Command<Model, IView, Presenter> {
     this.text = text;
   }
 
-  @Override
-  public void preExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void execute(Model model, IView view, Presenter presenter) {
     Intent emailIntent = new Intent(Intent.ACTION_SEND);
@@ -56,11 +51,6 @@ public class EmailSendingCommand extends Command<Model, IView, Presenter> {
     view.getActivity().startActivity(Intent.createChooser(emailIntent, ResourceUtil.getString(R.string.sending_email)));
   }
 
-  @Override
-  public void postExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void dispose() {
 

+ 0 - 9
app/src/main/java/kr/co/zumo/app/lifeplus/view/command/ExitCommand.java

@@ -21,10 +21,6 @@ import kr.co.zumo.app.lifeplus.view.presenter.Presenter;
  * @since 2018-09-22
  */
 public class ExitCommand extends Command<Model, IView, Presenter> {
-  @Override
-  public void preExecute(Model model, IView view, Presenter presenter) {
-
-  }
 
   @Override
   public void execute(Model model, IView view, Presenter presenter) {
@@ -37,11 +33,6 @@ public class ExitCommand extends Command<Model, IView, Presenter> {
     }
   }
 
-  @Override
-  public void postExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void dispose() {
 

+ 0 - 10
app/src/main/java/kr/co/zumo/app/lifeplus/view/command/FragmentChangeCommand.java

@@ -38,11 +38,6 @@ public class FragmentChangeCommand extends Command<Model, IView, Presenter> {
     return new FragmentChanger(helper.getAppCompatActivity().getSupportFragmentManager(), helper.getContainerId(), factory);
   }
 
-  @Override
-  public void preExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void execute(Model model, IView view, Presenter presenter) {
     FragmentFactory factory = model.getFragmentFactory();
@@ -64,11 +59,6 @@ public class FragmentChangeCommand extends Command<Model, IView, Presenter> {
     }
   }
 
-  @Override
-  public void postExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void dispose() {
   }

+ 1 - 10
app/src/main/java/kr/co/zumo/app/lifeplus/view/command/NotificationSettingCommand.java

@@ -15,6 +15,7 @@ import kr.co.zumo.app.lifeplus.view.presenter.Presenter;
 
 /**
  * NotificationSettingCommand
+ * - App 알림 설정 화면 호출
  * <pre>
  * </pre>
  *
@@ -32,11 +33,6 @@ public class NotificationSettingCommand extends Command {
     this.uid = uid;
   }
 
-  @Override
-  public void preExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void execute(Model model, IView view, Presenter presenter) {
     Intent intent = new Intent();
@@ -58,11 +54,6 @@ public class NotificationSettingCommand extends Command {
     context.startActivity(intent);
   }
 
-  @Override
-  public void postExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
   @Override
   public void dispose() {
 

+ 0 - 51
app/src/main/java/kr/co/zumo/app/lifeplus/view/command/TextShareCommand.java

@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
- */
-package kr.co.zumo.app.lifeplus.view.command;
-
-import android.content.Intent;
-
-import kr.co.zumo.app.lifeplus.model.Model;
-import kr.co.zumo.app.lifeplus.view.IView;
-import kr.co.zumo.app.lifeplus.view.presenter.Presenter;
-
-/**
- * TextShareCommand
- * <pre>
- * </pre>
- *
- * @author 민효동
- * @version 1.0
- * @history 민효동   [2018-09-22]   [최초 작성]
- * @since 2018-09-22
- */
-public class TextShareCommand extends Command<Model, IView, Presenter> {
-  protected String text;
-
-  public TextShareCommand(String text) {
-    this.text = text;
-  }
-
-  @Override
-  public void preExecute(Model model, IView view, Presenter presenter) {
-  }
-
-  @Override
-  public void execute(Model model, IView view, Presenter presenter) {
-    Intent intent = new Intent();
-    intent.setAction(Intent.ACTION_SEND);
-    intent.putExtra(Intent.EXTRA_TEXT, this.text);
-    intent.setType("text/plain");
-    view.getActivity().startActivity(intent);
-  }
-
-  @Override
-  public void postExecute(Model model, IView view, Presenter presenter) {
-
-  }
-
-  @Override
-  public void dispose() {
-
-  }
-}

+ 0 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/presenter/Presenter.java

@@ -148,9 +148,7 @@ public abstract class Presenter<M extends Model, V extends IView> implements ILi
   protected void onCommand(Command command) {
     this.command = command;
     Log.w("APP# Presenter | onCommand", "| " + this.getClass().getSimpleName() + ", command: " + command.getClass().getSimpleName() + ", " + new Gson().toJson(command));
-    command.preExecute(model, view, this);
     command.execute(model, view, this);
-    command.postExecute(model, view, this);
   }
 
   protected void showErrorDialog(String string) {

+ 1 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/setting/SettingPresenter.java

@@ -231,10 +231,9 @@ public class SettingPresenter extends Presenter<SettingModel, ISettingView> {
           // 코드 관리
           if (index == SettingViewHolder.CODE_SHARE || index == SettingViewHolder.CODE_RECOMMENDED) {
             // 내 추천인 코드 공유
-            // 추천인 코드 D4KDFJ1F
+            // 추천인 코드
             String code = model.getSettingMemberBean().getMyRecommendCode();
             if (StringUtil.isFull(code)) {
-              //onCommand(new TextShareCommand(code));
               //추천 팝업 띄우기
               alertDialog = new DialogBuilder<CurrentPageShareDialog, ICustomDialogListener>(DialogID.SHARE)
                 .listener(new ICustomDialogListener<CurrentPageShareDialog>() {