Improvement - do not call notifyDataSetChanged when selection state is unchanged

This commit is contained in:
Uladzislau Petrushkevich
2025-09-15 23:10:07 +02:00
parent bef966bdfe
commit 70342c8c6c

View File

@@ -70,6 +70,8 @@ class HabitCardListAdapter @Inject constructor(
* Sets all items as not selected.
*/
override fun clearSelection() {
if (selected.isEmpty()) return
selected.clear()
notifyDataSetChanged()
observable.notifyListeners()