diff --git a/app/src/main/java/xyz/cottongin/radio247/ui/screens/nowplaying/NowPlayingScreen.kt b/app/src/main/java/xyz/cottongin/radio247/ui/screens/nowplaying/NowPlayingScreen.kt index 35db5ed..3a46140 100644 --- a/app/src/main/java/xyz/cottongin/radio247/ui/screens/nowplaying/NowPlayingScreen.kt +++ b/app/src/main/java/xyz/cottongin/radio247/ui/screens/nowplaying/NowPlayingScreen.kt @@ -473,8 +473,7 @@ private fun TickerText( if (overflowPx > 0f) { key(text) { val velocityPxPerMs = with(density) { velocityDpPerSecond.dp.toPx() } / 1000f - val totalScrollPx = textWidthPx + containerWidthPx - val scrollMs = (totalScrollPx / velocityPxPerMs).toInt() + val scrollMs = (textWidthPx / velocityPxPerMs).toInt() val offset = remember { Animatable(0f) } val alpha = remember { Animatable(0f) } @@ -487,7 +486,7 @@ private fun TickerText( while (true) { offset.animateTo( - -totalScrollPx, + -textWidthPx, tween(scrollMs, easing = LinearEasing) ) offset.snapTo(0f)