mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-31 02:44:57 +01:00
renaming a function
This commit is contained in:
parent
1519bd337d
commit
a38441f930
@ -27,7 +27,7 @@ public class CalendarImpl implements DBHelper.DBOperationsListener {
|
||||
mEvents = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void updateCalendar(DateTime targetDate) {
|
||||
public void updateMonthlyCalendar(DateTime targetDate) {
|
||||
mTargetDate = targetDate;
|
||||
final int startTS = Formatter.getDayStartTS(Formatter.getDayCodeFromDateTime(mTargetDate.minusMonths(1)));
|
||||
final int endTS = Formatter.getDayEndTS(Formatter.getDayCodeFromDateTime(mTargetDate.plusMonths(1)));
|
||||
@ -39,11 +39,11 @@ public class CalendarImpl implements DBHelper.DBOperationsListener {
|
||||
}
|
||||
|
||||
void getPrevMonth() {
|
||||
updateCalendar(mTargetDate.minusMonths(1));
|
||||
updateMonthlyCalendar(mTargetDate.minusMonths(1));
|
||||
}
|
||||
|
||||
void getNextMonth() {
|
||||
updateCalendar(mTargetDate.plusMonths(1));
|
||||
updateMonthlyCalendar(mTargetDate.plusMonths(1));
|
||||
}
|
||||
|
||||
public void getDays() {
|
||||
|
@ -74,7 +74,7 @@ public class MyWidgetProvider extends AppWidgetProvider implements Calendar {
|
||||
mRemoteViews.setInt(R.id.calendar_holder, "setBackgroundColor", bgColor);
|
||||
|
||||
mCalendar = new CalendarImpl(this, mContext);
|
||||
mCalendar.updateCalendar(new DateTime());
|
||||
mCalendar.updateMonthlyCalendar(new DateTime());
|
||||
}
|
||||
|
||||
private void updateWidget() {
|
||||
|
@ -99,7 +99,7 @@ public class WidgetConfigureActivity extends AppCompatActivity implements Calend
|
||||
mBgSeekBar.setProgress((int) (mBgAlpha * 100));
|
||||
updateBgColor();
|
||||
|
||||
new CalendarImpl(this, getApplicationContext()).updateCalendar(new DateTime());
|
||||
new CalendarImpl(this, getApplicationContext()).updateMonthlyCalendar(new DateTime());
|
||||
}
|
||||
|
||||
private SharedPreferences initPrefs(Context context) {
|
||||
|
@ -70,7 +70,7 @@ class MonthFragment : Fragment(), Calendar {
|
||||
mCalendar.apply {
|
||||
targetDate = Formatter.getDateTimeFromCode(mDayCode)
|
||||
getDays() // prefill the screen asap, even if without events
|
||||
updateCalendar(Formatter.getDateTimeFromCode(mDayCode))
|
||||
updateMonthlyCalendar(Formatter.getDateTimeFromCode(mDayCode))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user