diff --git a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt index 49274f986ed..ab8c6d2ebc6 100644 --- a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt +++ b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt @@ -165,10 +165,10 @@ fun MutableList.applyDiff( for (i in it.removed.indices.sortedDescending()) { removeAt(it.removed[i].index) } - it.replaced.forEach { (_, new) -> - set(new.index, new.value) - } it.added.forEach { (i, t) -> add(i, t) } + it.replaced.forEach { (_, new) -> + set(new.index, new.value) + } }