renaming a function

This commit is contained in:
tibbi 2016-10-19 23:45:44 +02:00
parent 1519bd337d
commit a38441f930
4 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ public class CalendarImpl implements DBHelper.DBOperationsListener {
mEvents = new ArrayList<>(); mEvents = new ArrayList<>();
} }
public void updateCalendar(DateTime targetDate) { public void updateMonthlyCalendar(DateTime targetDate) {
mTargetDate = targetDate; mTargetDate = targetDate;
final int startTS = Formatter.getDayStartTS(Formatter.getDayCodeFromDateTime(mTargetDate.minusMonths(1))); final int startTS = Formatter.getDayStartTS(Formatter.getDayCodeFromDateTime(mTargetDate.minusMonths(1)));
final int endTS = Formatter.getDayEndTS(Formatter.getDayCodeFromDateTime(mTargetDate.plusMonths(1))); final int endTS = Formatter.getDayEndTS(Formatter.getDayCodeFromDateTime(mTargetDate.plusMonths(1)));
@ -39,11 +39,11 @@ public class CalendarImpl implements DBHelper.DBOperationsListener {
} }
void getPrevMonth() { void getPrevMonth() {
updateCalendar(mTargetDate.minusMonths(1)); updateMonthlyCalendar(mTargetDate.minusMonths(1));
} }
void getNextMonth() { void getNextMonth() {
updateCalendar(mTargetDate.plusMonths(1)); updateMonthlyCalendar(mTargetDate.plusMonths(1));
} }
public void getDays() { public void getDays() {

View File

@ -74,7 +74,7 @@ public class MyWidgetProvider extends AppWidgetProvider implements Calendar {
mRemoteViews.setInt(R.id.calendar_holder, "setBackgroundColor", bgColor); mRemoteViews.setInt(R.id.calendar_holder, "setBackgroundColor", bgColor);
mCalendar = new CalendarImpl(this, mContext); mCalendar = new CalendarImpl(this, mContext);
mCalendar.updateCalendar(new DateTime()); mCalendar.updateMonthlyCalendar(new DateTime());
} }
private void updateWidget() { private void updateWidget() {

View File

@ -99,7 +99,7 @@ public class WidgetConfigureActivity extends AppCompatActivity implements Calend
mBgSeekBar.setProgress((int) (mBgAlpha * 100)); mBgSeekBar.setProgress((int) (mBgAlpha * 100));
updateBgColor(); updateBgColor();
new CalendarImpl(this, getApplicationContext()).updateCalendar(new DateTime()); new CalendarImpl(this, getApplicationContext()).updateMonthlyCalendar(new DateTime());
} }
private SharedPreferences initPrefs(Context context) { private SharedPreferences initPrefs(Context context) {

View File

@ -70,7 +70,7 @@ class MonthFragment : Fragment(), Calendar {
mCalendar.apply { mCalendar.apply {
targetDate = Formatter.getDateTimeFromCode(mDayCode) targetDate = Formatter.getDateTimeFromCode(mDayCode)
getDays() // prefill the screen asap, even if without events getDays() // prefill the screen asap, even if without events
updateCalendar(Formatter.getDateTimeFromCode(mDayCode)) updateMonthlyCalendar(Formatter.getDateTimeFromCode(mDayCode))
} }
} }