Diff computing fix

This commit is contained in:
Denis Karmyshakov 2018-05-30 16:59:01 +03:00
parent 5b3ccdbf91
commit f3d076aa6c
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import android.support.v7.widget.RecyclerView
class OffsetAdapterUpdateCallback(private val adapter: RecyclerView.Adapter<*>, private val offsetProvider: () -> Int) : ListUpdateCallback {
override fun onInserted(position: Int, count: Int) {
adapter.notifyItemInserted(position + offsetProvider())
adapter.notifyItemRangeInserted(position + offsetProvider(), count)
}
override fun onRemoved(position: Int, count: Int) {