From ab115b72d43e9c9805bce8dbee11df9609e15caf Mon Sep 17 00:00:00 2001 From: hlq07 Date: Sat, 12 May 2018 13:09:19 +0800 Subject: [PATCH] add "showAlert" into Presenter --- .../cutem/cutecalendar/presenter/PaintCalendarStrategy.java | 4 +--- .../main/java/org/cutem/cutecalendar/presenter/Presenter.java | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/cutem/cutecalendar/presenter/PaintCalendarStrategy.java b/app/src/main/java/org/cutem/cutecalendar/presenter/PaintCalendarStrategy.java index 276fd43..d161ef8 100644 --- a/app/src/main/java/org/cutem/cutecalendar/presenter/PaintCalendarStrategy.java +++ b/app/src/main/java/org/cutem/cutecalendar/presenter/PaintCalendarStrategy.java @@ -176,7 +176,7 @@ public class PaintCalendarStrategy { String time = String.format("%s-%s-1/0:0", y, m); mPresenter.paintCalendar(CalendarUtil.constructCalendar(time)); } else { - showAlert("give a number"); + mPresenter.showAlert(0, "give a number"); } } @@ -184,6 +184,4 @@ public class PaintCalendarStrategy { mPresenter.paintCalendar(Calendar.getInstance()); } - private void showAlert(String text) { - } } diff --git a/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java b/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java index 4d64448..503bf09 100644 --- a/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java +++ b/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java @@ -86,4 +86,5 @@ public abstract class Presenter { listTodoItems(manager.queryTodoItemsDuring(from, to)); } + protected abstract void showAlert(int type, String text); }