Skip to content

Commit

Permalink
fix: seeking indicator stuck at 0 when seeking backwards.
Browse files Browse the repository at this point in the history
closes #74
  • Loading branch information
abdallahmehiz committed Sep 12, 2024
1 parent dbdb750 commit c9159a0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ fun GestureHandler(modifier: Modifier = Modifier) {
if (position >= duration && dragAmount > 0) return@detectHorizontalDragGestures
calculateNewHorizontalGestureValue(startingPosition, startingX, change.position.x, 0.15f).let {
viewModel.gestureSeekAmount.update { _ ->
Pair(startingPosition, (it - startingPosition).coerceIn(0, (duration - startingPosition).toInt()))
Pair(startingPosition, (it - startingPosition)
.coerceIn(0 - startingPosition, (duration - startingPosition).toInt()))
}
viewModel.seekTo(it, preciseSeeking)
}
Expand Down

0 comments on commit c9159a0

Please sign in to comment.