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) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
val action = intent.action
|
val action = intent.action
|
||||||
|
if (mCalendar == null) {
|
||||||
|
initVariables(context)
|
||||||
|
}
|
||||||
|
|
||||||
when (action) {
|
when (action) {
|
||||||
PREV -> mCalendar?.getPrevMonth()
|
PREV -> mCalendar?.getPrevMonth()
|
||||||
NEXT -> mCalendar?.getNextMonth()
|
NEXT -> mCalendar?.getNextMonth()
|
||||||
|
|
Loading…
Reference in New Issue