Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit 981d408

Browse files
oscar-adjafu888
authored andcommitted
[Compose] Rename OnSwipe Spring parameters
Removed redundant 'spring' prefix to parameters
1 parent fdc9d77 commit 981d408

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

constraintlayout/compose/src/androidTest/java/androidx/constraintlayout/compose/OnSwipeTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private fun OnSwipeTestDsl() {
195195
anchor = box,
196196
direction = SwipeDirection.End,
197197
side = SwipeSide.End,
198-
mode = SwipeMode.Spring(springThreshold = 0.0001f),
198+
mode = SwipeMode.Spring(threshold = 0.0001f),
199199
onTouchUp = SwipeTouchUp.NeverCompleteStart,
200200
)
201201
}

constraintlayout/compose/src/main/java/androidx/constraintlayout/compose/TransitionScope.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -422,19 +422,19 @@ class SwipeMode internal constructor(
422422
)
423423

424424
fun Spring(
425-
springMass: Float = 1f,
426-
springStiffness: Float = 400f,
427-
springDamping: Float = 10f,
428-
springThreshold: Float = 0.01f,
429-
springBoundary: SpringBoundary = SpringBoundary.Overshoot
425+
mass: Float = 1f,
426+
stiffness: Float = 400f,
427+
damping: Float = 10f,
428+
threshold: Float = 0.01f,
429+
boundary: SpringBoundary = SpringBoundary.Overshoot
430430
): SwipeMode =
431431
SwipeMode(
432432
name = "spring",
433-
springMass = springMass,
434-
springStiffness = springStiffness,
435-
springDamping = springDamping,
436-
springThreshold = springThreshold,
437-
springBoundary = springBoundary
433+
springMass = mass,
434+
springStiffness = stiffness,
435+
springDamping = damping,
436+
springThreshold = threshold,
437+
springBoundary = boundary
438438
)
439439
}
440440
}

0 commit comments

Comments
 (0)