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:
austinried
2026-10-04 00:30:00 +00:00
parent b189ae0cc5
commit 718dcf31bd
3 changed files with 26 additions and 4 deletions
@@ -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)