diff --git a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimationSpec.kt b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimationSpec.kt index 8833cf28def3e..979c19e74ed9a 100644 --- a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimationSpec.kt +++ b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/AnimationSpec.kt @@ -680,7 +680,10 @@ class KeyframesSpec(val config: KeyframesSpecConfig) : DurationBasedAnimat if (!config.keyframes.contains(config.durationMillis)) { timestamps.add(config.durationMillis) } - timestamps.sort() + + //the reason is https://youtrack.jetbrains.com/issue/KT-70005 + //it was fixed in androidx.collection:collection:1.5.0-alpha01, but we redirect on 1.4.0 yet + if (timestamps.isNotEmpty()) timestamps.sort() return VectorizedKeyframesSpec( timestamps = timestamps, @@ -788,7 +791,10 @@ class KeyframesWithSplineSpec( if (!config.keyframes.contains(config.durationMillis)) { timestamps.add(config.durationMillis) } - timestamps.sort() + + //the reason is https://youtrack.jetbrains.com/issue/KT-70005 + //it was fixed in androidx.collection:collection:1.5.0-alpha01, but we redirect on 1.4.0 yet + if (timestamps.isNotEmpty()) timestamps.sort() return VectorizedMonoSplineKeyframesSpec( timestamps = timestamps, keyframes = timeToVectorMap, diff --git a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec.kt b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec.kt index 5b75fd3e874bb..54dfb0482be95 100644 --- a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec.kt +++ b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec.kt @@ -262,7 +262,10 @@ class VectorizedKeyframesSpec internal constructor( if (!keyframes.containsKey(durationMillis)) { times.add(durationMillis) } - times.sort() + + //the reason is https://youtrack.jetbrains.com/issue/KT-70005 + //it was fixed in androidx.collection:collection:1.5.0-alpha01, but we redirect on 1.4.0 yet + if (times.isNotEmpty()) times.sort() return@run times }, keyframes = kotlin.run { diff --git a/compose/material3/adaptive/adaptive-layout/src/commonMain/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState.kt b/compose/material3/adaptive/adaptive-layout/src/commonMain/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState.kt index 8014e5c68ea31..435ce2fd7ef20 100644 --- a/compose/material3/adaptive/adaptive-layout/src/commonMain/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState.kt +++ b/compose/material3/adaptive/adaptive-layout/src/commonMain/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState.kt @@ -218,7 +218,8 @@ private fun List.toPositions( anchors.add(maxExpansionWidth * anchor.percentage / 100) } } - //https://youtrack.jetbrains.com/issue/KT-70005 + //the reason is https://youtrack.jetbrains.com/issue/KT-70005 + //it was fixed in androidx.collection:collection:1.5.0-alpha01, but we redirect on 1.4.0 yet if (anchors.isNotEmpty()) anchors.sort() return anchors }