Fix Older versions of app not disappearing properly

This commit is contained in:
LooKeR 2022-03-04 00:03:52 +05:30
parent 5f4dffd483
commit fb019bb283

View File

@ -1002,9 +1002,12 @@ class AppDetailAdapter(private val callbacks: Callbacks) :
items[position - 1] = expandItem.items[1]
notifyItemRangeChanged(position - 1, 2)
} else {
items.removeAt(position - 1)
items.removeAll(expandItem.items)
if (position > 0) {
notifyItemRemoved(position - 1)
notifyItemRangeRemoved(
position - expandItem.items.size,
expandItem.items.size
)
notifyItemChanged(position)
}
}