fix #84, allow changing widget months if the calendar app is killed
This commit is contained in:
parent
70dc7e07cf
commit
4ecc5f5f37
|
@ -99,6 +99,10 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val action = intent.action
|
||||
if (mCalendar == null) {
|
||||
initVariables(context)
|
||||
}
|
||||
|
||||
when (action) {
|
||||
PREV -> mCalendar?.getPrevMonth()
|
||||
NEXT -> mCalendar?.getNextMonth()
|
||||
|
|
Loading…
Reference in New Issue