mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
allow queue loading during drag; keep the album title after a reorder
- the mid-drag load guard also stopped the window extending while auto-scrolling, so dragging a context row over a long up-next block hit the loaded edge and dropped. Removed it: loadOlder/loadNewer now extend from the min/max loaded position, which is what prevents the duplicates. - a reordered track becomes an explicit song entry, so the context kind switches to Song and the queue title fell back to "Next from here". sourceName now resolves a song entry to its album so the title keeps the album name.
This commit is contained in:
@@ -1001,6 +1001,25 @@ class PlaybackControllerTest {
|
||||
assertEquals(runBlocking { queues.combinedIndexOf(snapshot, "s3") }, controller.state.value.position)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun movingThePlayingContextTrackStillResolvesAnAlbumTitle() {
|
||||
seedAlbum(3, sourceId = 1)
|
||||
|
||||
controller.playAlbum(1, "al1", 1)
|
||||
await {
|
||||
controller.state.value.item
|
||||
?.id == "s2"
|
||||
}
|
||||
|
||||
runBlocking { controller.move(1, 0) }
|
||||
await {
|
||||
controller.state.value.item
|
||||
?.id == "s2"
|
||||
}
|
||||
|
||||
assertEquals("Album", runBlocking { controller.sourceTitle(controller.state.value.context) })
|
||||
}
|
||||
|
||||
@Test
|
||||
fun nextFollowsTheReorderedQueue() {
|
||||
seedAlbum(3, sourceId = 1)
|
||||
|
||||
Reference in New Issue
Block a user