mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
key the queue now-playing highlight by song id
This commit is contained in:
@@ -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 = {},
|
||||
|
||||
Reference in New Issue
Block a user