manneohlund / smart-recycler-adapter

Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding.
https://manneohlund.github.io/smart-recycler-adapter/
Apache License 2.0
402 stars 51 forks source link

Fix update item count when DiffUtil used #22

Closed zerowns closed 4 years ago

zerowns commented 4 years ago

Using DiffUtil, an error occurred when adding items. So the solution to this was to call updateItemCount()

manneohlund commented 4 years ago

Ah good catch and thanks @zerowns for your contribution! Would be nice to back this up with a simple test also. Lgtm and I will test before merging! Ps: I'm in process of moving Diff util to a separate extension lib for the v5.0.0 release like ViewEvent 🚀