Skip to content

Commit

Permalink
Modify android code and tests to conform to API change
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-semyonov committed Jun 27, 2023
1 parent 5656f02 commit d5ad295
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ class ScrollableTest {
val outerState = ScrollableState(consumeScrollDelta = { 0f })
val innerState = ScrollableState(consumeScrollDelta = { 0f })
val innerFlingBehavior = object : FlingBehavior {
override suspend fun ScrollScope.performFling(initialVelocity: Float): Float {
override suspend fun ScrollScope.performFling(initialVelocity: Float, flingIntoOverscrollEffect: FlingIntoOverscrollEffect?): Float {
return initialVelocity
}
}
Expand Down Expand Up @@ -1473,7 +1473,7 @@ class ScrollableTest {
var flingCalled = 0
var flingVelocity: Float = Float.MAX_VALUE
val flingBehaviour = object : FlingBehavior {
override suspend fun ScrollScope.performFling(initialVelocity: Float): Float {
override suspend fun ScrollScope.performFling(initialVelocity: Float, flingIntoOverscrollEffect: FlingIntoOverscrollEffect?): Float {
flingCalled++
flingVelocity = initialVelocity
return 0f
Expand Down Expand Up @@ -1509,7 +1509,7 @@ class ScrollableTest {
var flingCalled = 0
var flingVelocity: Float = Float.MAX_VALUE
val flingBehaviour = object : FlingBehavior {
override suspend fun ScrollScope.performFling(initialVelocity: Float): Float {
override suspend fun ScrollScope.performFling(initialVelocity: Float, flingIntoOverscrollEffect: FlingIntoOverscrollEffect?): Float {
flingCalled++
flingVelocity = initialVelocity
return 0f
Expand Down Expand Up @@ -1546,7 +1546,7 @@ class ScrollableTest {
var flingCalled = 0
var flingVelocity: Float = Float.MAX_VALUE
val flingBehaviour = object : FlingBehavior {
override suspend fun ScrollScope.performFling(initialVelocity: Float): Float {
override suspend fun ScrollScope.performFling(initialVelocity: Float, flingIntoOverscrollEffect: FlingIntoOverscrollEffect?): Float {
flingCalled++
flingVelocity = initialVelocity
return 0f
Expand Down Expand Up @@ -1582,7 +1582,7 @@ class ScrollableTest {
}
)
val flingBehaviour = object : FlingBehavior {
override suspend fun ScrollScope.performFling(initialVelocity: Float): Float {
override suspend fun ScrollScope.performFling(initialVelocity: Float, flingIntoOverscrollEffect: FlingIntoOverscrollEffect?): Float {
returned = scrollBy(123f)
return 0f
}
Expand Down Expand Up @@ -1625,7 +1625,7 @@ class ScrollableTest {
}
)
val flingBehaviour = object : FlingBehavior {
override suspend fun ScrollScope.performFling(initialVelocity: Float): Float {
override suspend fun ScrollScope.performFling(initialVelocity: Float, flingIntoOverscrollEffect: FlingIntoOverscrollEffect?): Float {
returned = scrollBy(123f)
return 0f
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal class ScalingLazyColumnSnapFlingBehavior(
val decay: DecayAnimationSpec<Float> = exponentialDecay()
) : FlingBehavior {

override suspend fun ScrollScope.performFling(initialVelocity: Float): Float {
override suspend fun ScrollScope.performFling(initialVelocity: Float, flingIntoOverscrollEffect: FlingIntoOverscrollEffect?): Float {
val animationState = AnimationState(
initialValue = 0f,
initialVelocity = initialVelocity,
Expand Down

0 comments on commit d5ad295

Please sign in to comment.