summaryrefslogtreecommitdiff
path: root/sw-ui/src/main
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2022-07-03 00:18:46 +0200
committerJoffrey Bion <joffrey.bion@gmail.com>2022-07-03 00:20:01 +0200
commit6640170c01ccf5c7de8c0893379c1b500f9e9fb1 (patch)
tree1b8b712a5ecf4fd7baf62f0c4a9b8399db1bcad7 /sw-ui/src/main
parentUpgrade Spring boot to 2.7.1 (diff)
downloadseven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.tar.gz
seven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.tar.bz2
seven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.zip
Upgrade to Kotlin 1.7
Diffstat (limited to 'sw-ui/src/main')
-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