diff --git a/composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/ui/component/ModalBottomSheet.kt b/composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/ui/component/ModalBottomSheet.kt index d6c743569..a6de98e20 100644 --- a/composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/ui/component/ModalBottomSheet.kt +++ b/composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/ui/component/ModalBottomSheet.kt @@ -927,6 +927,11 @@ fun QueueBottomSheet( queueData?.data?.listTracks ?: emptyList() } } + val currentSongIndex by remember(queue, songEntity) { + derivedStateOf { + musicServiceHandler.currentOrderIndex().takeIf { it > -1 } ?: 0 + } + } val loadMoreState by remember { derivedStateOf { queueData?.queueState ?: QueueData.StateSource.STATE_CREATED @@ -1167,7 +1172,7 @@ fun QueueBottomSheet( ) { _ -> SongFullWidthItems( track = track, - isPlaying = track.videoId == songEntity?.videoId, + isPlaying = index == currentSongIndex, modifier = Modifier .fillMaxWidth(),