Skip to content
Snippets Groups Projects
Commit 46547ddf authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix IndexOutOfBoundsException

parent 622afd77
No related branches found
No related tags found
1 merge request!7023.3 fixes
......@@ -82,7 +82,8 @@ class LiveDataset<T> : MutableLiveData<MutableList<T>>() {
}
fun move(item: T, newIndex: Int) {
move(internalList.indexOf(item), newIndex)
val from = internalList.indexOf(item)
if (from > 0) move(from, newIndex)
}
fun move(from: Int, to: Int) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment