initialize the mCalendar sooner

This commit is contained in:
tibbi 2016-11-19 11:29:42 +01:00
parent cf9ce74f63
commit e4b1d63ce7
1 changed files with 1 additions and 1 deletions

View File

@ -48,6 +48,7 @@ class MyWidgetProvider : AppWidgetProvider(), MonthlyCalendar {
private fun initVariables(context: Context) {
mContext = context
mRes = mContext.resources
mCalendar = MonthlyCalendarImpl(this, mContext)
val prefs = initPrefs(context)
val storedTextColor = prefs.getInt(WIDGET_TEXT_COLOR, Color.WHITE)
@ -67,7 +68,6 @@ class MyWidgetProvider : AppWidgetProvider(), MonthlyCalendar {
val bgColor = prefs.getInt(WIDGET_BG_COLOR, Color.BLACK)
mRemoteViews.setInt(R.id.calendar_holder, "setBackgroundColor", bgColor)
mCalendar = MonthlyCalendarImpl(this, mContext)
mCalendar.updateMonthlyCalendar(DateTime())
}