Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArrayIndexOutOfBoundsException on iOS and Wasm #1548

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,10 @@ class KeyframesSpec<T>(val config: KeyframesSpecConfig<T>) : 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,
Expand Down Expand Up @@ -788,7 +791,10 @@ class KeyframesWithSplineSpec<T>(
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ class VectorizedKeyframesSpec<V : AnimationVector> 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ private fun List<PaneExpansionAnchor>.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
}
Expand Down