key the queue now-playing highlight by song id

This commit is contained in:
austinried
2026-10-04 00:29:55 +00:00
parent 59d20d4eda
commit e1171d7588
2 changed files with 4 additions and 4 deletions
@@ -254,7 +254,7 @@ fun QueueRoute(
QueueScreen(
rows = viewModel.rows,
ready = viewModel.ready,
currentPosition = playback.position,
currentSongId = playback.item?.id,
coverArt = sourceRepository::coverArt,
onBack = onBack,
onPlay = viewModel::play,
@@ -273,7 +273,7 @@ fun QueueRoute(
fun QueueScreen(
rows: List<QueueRow>,
ready: Boolean,
currentPosition: Long?,
currentSongId: String?,
coverArt: (String?, Boolean) -> CoverArtRef?,
onBack: () -> Unit,
onPlay: (Long) -> Unit,
@@ -361,7 +361,7 @@ fun QueueScreen(
) { isDragging ->
QueueRowItem(
row = row,
isPlaying = row.position == currentPosition,
isPlaying = row.song.song.id == currentSongId,
floating = isDragging,
coverArt = coverArt,
dragHandle =
@@ -308,7 +308,7 @@ class AppScreenshotTest {
rows =
Fixtures.songItems.mapIndexed { index, item -> QueueRow(index.toLong(), index.toLong(), item) },
ready = true,
currentPosition = 1,
currentSongId = Fixtures.songItems[1].song.id,
coverArt = { id, _ -> id?.let { CoverArtRef(it, "test:$it") } },
onBack = {},
onPlay = {},