diff options
author | Joffrey Bion <joffrey.bion@gmail.com> | 2022-07-03 00:18:46 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@gmail.com> | 2022-07-03 00:20:01 +0200 |
commit | 6640170c01ccf5c7de8c0893379c1b500f9e9fb1 (patch) | |
tree | 1b8b712a5ecf4fd7baf62f0c4a9b8399db1bcad7 /sw-ui | |
parent | Upgrade Spring boot to 2.7.1 (diff) | |
download | seven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.tar.gz seven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.tar.bz2 seven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.zip |
Upgrade to Kotlin 1.7
Diffstat (limited to 'sw-ui')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialList.kt | 3 |
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 -> |