I am using a RecyclerView
with ListAdapter (which uses AsyncListDiffer to calculate and animate changes when list is replaced).
The problem is that if I
To add to Carson's answer, which is a better way to do it, you can maintain the benefits of submitList
as follows in Kotlin:
submitList(oldList.toList().toMutableList().let {
it[index] = it[index].copy(property = newvalue) // To update a property on an item
it.add(newItem) // To add a new item
it.removeAt[index] // To remove an item
// and so on....
it
})