mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-03 13:58:28 +08:00
Undid temporary code change necessary for early versions of Kotlin 2.
Some checks failed
Tests / build (push) Has been cancelled
Some checks failed
Tests / build (push) Has been cancelled
This commit is contained in:
parent
0bde9390a8
commit
61949b2377
@ -28,11 +28,7 @@ internal class SimpleListCell<E>(
|
|||||||
override operator fun set(index: Int, element: E): E {
|
override operator fun set(index: Int, element: E): E {
|
||||||
checkIndex(index, elements.lastIndex)
|
checkIndex(index, elements.lastIndex)
|
||||||
|
|
||||||
// TODO: Use applyChange instead of MutationManager.changeDependency, once
|
applyChange {
|
||||||
// https://youtrack.jetbrains.com/issue/KT-69964 is fixed.
|
|
||||||
MutationManager.changeDependency {
|
|
||||||
emitDependencyInvalidated()
|
|
||||||
|
|
||||||
val removed = elements.set(index, element)
|
val removed = elements.set(index, element)
|
||||||
|
|
||||||
finalizeChange(
|
finalizeChange(
|
||||||
@ -85,11 +81,7 @@ internal class SimpleListCell<E>(
|
|||||||
override fun removeAt(index: Int): E {
|
override fun removeAt(index: Int): E {
|
||||||
checkIndex(index, elements.lastIndex)
|
checkIndex(index, elements.lastIndex)
|
||||||
|
|
||||||
// TODO: Use applyChange instead of MutationManager.changeDependency, once
|
applyChange {
|
||||||
// https://youtrack.jetbrains.com/issue/KT-69964 is fixed.
|
|
||||||
MutationManager.changeDependency {
|
|
||||||
emitDependencyInvalidated()
|
|
||||||
|
|
||||||
val prevSize = elements.size
|
val prevSize = elements.size
|
||||||
val removed = elements.removeAt(index)
|
val removed = elements.removeAt(index)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user