Created
May 9, 2018 09:41
-
-
Save anitaa1990/58dfb247f3dca15adfd9160285da1ce0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public void addTasks(List<Note> newNotes) { | |
| NoteDiffUtil noteDiffUtil = new NoteDiffUtil(notes, newNotes); | |
| DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(noteDiffUtil); | |
| notes.clear(); | |
| notes.addAll(newNotes); | |
| diffResult.dispatchUpdatesTo(this); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment