mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 23:00:31 +05:30
8 lines
209 B
Kotlin
8 lines
209 B
Kotlin
package com.github.libretube.extensions
|
|
|
|
fun <T> MutableList<T>.move(oldPosition: Int, newPosition: Int) {
|
|
val item = this.get(oldPosition)
|
|
this.removeAt(oldPosition)
|
|
this.add(newPosition, item)
|
|
}
|