moveModel

open fun moveModel(fromPosition: Int, toPosition: Int)

An optimized way to move a model from one position to another without rebuilding all models.This is intended to be used with androidx.recyclerview.widget.ItemTouchHelper toallow for efficient item dragging and rearranging. It cannot be

If you call this you MUST also update the data backing your models as necessary.

This will immediately change the model's position and notify the change to the RecyclerView.However, a delayed request to rebuild models will be scheduled for the future to guarantee thatmodels are in sync with data.

Parameters

fromPosition

Previous position of the item.

toPosition

New position of the item.