mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-13 20:48:52 -06:00
Improvement - do not call notifyDataSetChanged when selection state is unchanged
This commit is contained in:
@@ -70,6 +70,8 @@ class HabitCardListAdapter @Inject constructor(
|
|||||||
* Sets all items as not selected.
|
* Sets all items as not selected.
|
||||||
*/
|
*/
|
||||||
override fun clearSelection() {
|
override fun clearSelection() {
|
||||||
|
if (selected.isEmpty()) return
|
||||||
|
|
||||||
selected.clear()
|
selected.clear()
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
observable.notifyListeners()
|
observable.notifyListeners()
|
||||||
|
|||||||
Reference in New Issue
Block a user