fix #84, allow changing widget months if the calendar app is killed

This commit is contained in:
tibbi 2017-02-21 20:50:18 +01:00
parent 70dc7e07cf
commit 4ecc5f5f37
1 changed files with 4 additions and 0 deletions

View File

@ -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()