Skip to content

Instantly share code, notes, and snippets.

@k0siara
Created May 30, 2021 23:14
Embed
What would you like to do?
RenderItems.kt
fun renderItems(newItems: List){
val diffResult: DiffUtil.DiffResult = DiffUtil.calculateDiff(DiffUtilCallback(oldItems, newItems))
diffResult.dispatchUpdatesTo(this) // this : RecyclerView.Adapter
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment