queue: invalidate keyset cursors on edits

This commit is contained in:
austinried
2026-11-14 12:03:42 +00:00
parent 94c7fba536
commit 762639cab5
2 changed files with 14 additions and 0 deletions
@@ -458,6 +458,18 @@ class QueueRepositoryTest {
assertEquals(3L, repository.remapPosition(updated, point.current!!))
}
@Test
fun aRemovalDoesNotReusePreEditKeysetRows() =
runTest {
seedLibrary()
val snapshot = repository.snapshotAfter(listOf(repository.albumEntry(1, "al1")))
assertEquals("s1", repository.itemAt(snapshot, 0)?.song?.id)
repository.removeAt(snapshot, 0)
assertEquals(listOf("s2", "s3"), resolveAll(repository.snapshot()))
}
@Test
fun anUnrelatedOriginResetRemapsWithinTheSecondUnchangedFragment() =
runTest {