Open StylianosGakis opened 2 years ago
Fix DiffUtil.ItemCallback implementation
The areItemsTheSame documentation explicitly says: "For example, if your items have unique ids, this method should check their id equality."
areItemsTheSame
In the current state, the DiffUtil.ItemCallback is implemented wrong.
DiffUtil.ItemCallback
https://github.com/android/views-widgets-samples/blob/f22069a57d5df0b58ce0be08086c3e9db35870b8/RecyclerViewKotlin/app/src/main/java/com/example/recyclersample/flowerList/FlowersAdapter.kt#L77-L83
Fix DiffUtil.ItemCallback implementation
The
areItemsTheSame
documentation explicitly says: "For example, if your items have unique ids, this method should check their id equality."In the current state, the
DiffUtil.ItemCallback
is implemented wrong.https://github.com/android/views-widgets-samples/blob/f22069a57d5df0b58ce0be08086c3e9db35870b8/RecyclerViewKotlin/app/src/main/java/com/example/recyclersample/flowerList/FlowersAdapter.kt#L77-L83