remove invalid hidden icons

This commit is contained in:
tibbi 2023-02-12 23:44:11 +01:00
parent bf61acc715
commit 8ba3c08cd1
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,12 @@ class HiddenIconsActivity : SimpleActivity(), RefreshRecyclerViewListener {
}
}
val iconsToRemove = hiddenIcons.filter { it.drawable == null }
if (iconsToRemove.isNotEmpty()) {
hiddenIconsDB.removeHiddenIcons(iconsToRemove)
hiddenIcons.removeAll(iconsToRemove)
}
runOnUiThread {
HiddenIconsAdapter(this, hiddenIcons, this, manage_hidden_icons_list) {
}.apply {