From fb019bb283e0810099cd7f0d953bbcce47283251 Mon Sep 17 00:00:00 2001 From: LooKeR Date: Fri, 4 Mar 2022 00:03:52 +0530 Subject: [PATCH] Fix Older versions of app not disappearing properly --- .../com/looker/droidify/ui/adapters/AppDetailAdapter.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt b/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt index d4cd6445..cb1328ce 100644 --- a/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt +++ b/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt @@ -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) } }