mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-15 00:42:54 +01:00
queue: invalidate keyset cursors on edits
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user