mirror of
https://github.com/home-assistant/android
synced 2024-09-06 17:23:32 +00:00
Added onDeleted function to Static widget (#797)
This commit is contained in:
parent
631b9d1cf5
commit
1fdb9e062a
|
@ -197,4 +197,11 @@ class StaticWidget : AppWidgetProvider() {
|
|||
throw Exception("Application Context passed is not of our application!")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDeleted(context: Context, appWidgetIds: IntArray) {
|
||||
staticWidgetDao = AppDatabase.getInstance(context).staticWidgetDao()
|
||||
appWidgetIds.forEach { appWidgetId ->
|
||||
staticWidgetDao.delete(appWidgetId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue