summaryrefslogtreecommitdiff
path: root/sw-ui/src/main/kotlin/org/luxons
diff options
context:
space:
mode:
Diffstat (limited to 'sw-ui/src/main/kotlin/org/luxons')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialList.kt3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialList.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialList.kt
index 3ca8c425..39ac8e8b 100644
--- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialList.kt
+++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialList.kt
@@ -39,7 +39,6 @@ fun <T> RBuilder.radialList(
}
}
-@OptIn(ExperimentalStdlibApi::class)
private fun <T> RBuilder.radialListItems(
items: List<T>,
renderItem: (T) -> ReactElement,
@@ -58,7 +57,7 @@ private fun <T> RBuilder.radialListItems(
}
// We ensure a stable order of the DOM elements so that position animations look nice.
// We still respect the order of the items in the list when placing them along the circle.
- val indexByKey = buildMap<String, Int> {
+ val indexByKey = buildMap {
items.forEachIndexed { index, item -> put(getKey(item), index) }
}
items.sortedBy { getKey(it) }.forEach { item ->
bgstack15