Skip to content

Instantly share code, notes, and snippets.

@jungilhan
Created May 11, 2018 02:57
Show Gist options
  • Save jungilhan/3bcb820f20a8ea4bdcbbb250e4994970 to your computer and use it in GitHub Desktop.
Save jungilhan/3bcb820f20a8ea4bdcbbb250e4994970 to your computer and use it in GitHub Desktop.
private val DIFF_CALLBACK = object : DiffUtil.ItemCallback<Int>() {
override fun areItemsTheSame(oldItem: Int?, newItem: Int?) =
oldItem == newItem // check uniqueness
override fun areContentsTheSame(oldItem: Int?, newItem: Int?) =
oldItem == newItem // check contents
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment