Created
May 30, 2021 23:14
-
-
Save k0siara/f50b0fd6732206ac3028cda7e3a39aa8 to your computer and use it in GitHub Desktop.
RenderItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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