Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
MatkovIvan committed Feb 12, 2024
1 parent 5bbe23d commit 617891b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.fastAny
import androidx.compose.ui.util.fastForEach
import kotlin.coroutines.coroutineContext
import kotlin.math.abs
import kotlin.math.roundToInt
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.isActive
Expand Down Expand Up @@ -259,7 +259,7 @@ private class AnimatedMouseWheelScrollPhysics(
var requiredAnimation = true
var lastValue = 0f
val anim = AnimationState(0f)
while (requiredAnimation && coroutineScope.isActive) {
while (requiredAnimation && coroutineContext.isActive) {
requiredAnimation = false
val durationMillis = (abs(target - anim.value) / speed)
.roundToInt()
Expand Down

0 comments on commit 617891b

Please sign in to comment.