mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
properly clean up removed widgets from the database
This commit is contained in:
@ -48,4 +48,13 @@ class MyWidgetProvider : AppWidgetProvider() {
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
override fun onDeleted(context: Context, appWidgetIds: IntArray) {
|
||||
super.onDeleted(context, appWidgetIds)
|
||||
Thread {
|
||||
appWidgetIds.forEach {
|
||||
context.widgetsDB.deleteWidgetId(it)
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user