Doist / RecyclerViewExtensions

RecyclerView made easier.
MIT License
493 stars 42 forks source link

Compare list object instances when diffing data sets #52

Closed AfzalivE closed 1 year ago

AfzalivE commented 1 year ago

This PR adds handling of the case where the backing list instance changes but the contents remain the same (based on their IDs and content hash). When this happens, onBindViewHolder doesn't get called for the items, which causes the ViewHolder to have reference to a stale instance.

This can cause some inconsistencies when mutating items in some cases.

AfzalivE commented 1 year ago

Going with the alternative of the AnimatedAdapter subclass handling this itself.