Comparing items

Report a typo

Reorder and reindent the following lines to get a working ItemCallback.

Note: the order of methods in a class doesn't matter from the perspective of the Kotlin compiler, but in order to pass this task, stick to the following: areItemsTheSame goes first and areContentsTheSame follows.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                oldItem.id == newItem.id
              
                override fun areContentsTheSame(oldItem: User, newItem: User): Boolean =
              
                object : DiffUtil.ItemCallback<User>() {
              
                oldItem.age == newItem.age && oldItem.name == newItem.name
              
                }
              
                override fun areItemsTheSame(oldItem: User, newItem: User): Boolean =
              
___

Create a free account to access the full topic