fun updateItems(
newItems: List<T>?,
itemSame: (T, T) -> Boolean,
contentSame: (T, T) -> Boolean
) {
val diffResult =
DiffUtil.calculateDiff(DiffCalc(this.items, newItems!!, itemSame, contentSame))
diffResult.dispatchUpdatesTo(this)
items = newItems
}
使用协程暂停它是一个好习惯吗?