mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
add a null check at widget updating
This commit is contained in:
@ -68,9 +68,11 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun updateWidget() {
|
private fun updateWidget() {
|
||||||
|
if (mRemoteViews != null) {
|
||||||
val thisWidget = ComponentName(mContext, MyWidgetMonthlyProvider::class.java)
|
val thisWidget = ComponentName(mContext, MyWidgetMonthlyProvider::class.java)
|
||||||
AppWidgetManager.getInstance(mContext).updateAppWidget(thisWidget, mRemoteViews)
|
AppWidgetManager.getInstance(mContext).updateAppWidget(thisWidget, mRemoteViews)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupIntent(action: String, id: Int) {
|
private fun setupIntent(action: String, id: Int) {
|
||||||
mIntent.action = action
|
mIntent.action = action
|
||||||
|
Reference in New Issue
Block a user