mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
suffix repeated disc titles with their disc number
When two discs of an album share a title, showing "Live" alone is ambiguous, so render "Live: Disc 1"/"Live: Disc 2". Unique titles stay as-is. Also drop the header from titleLarge to a semibold titleMedium so longer titles fit on one line.
This commit is contained in:
@@ -44,6 +44,16 @@ class AlbumDiscsTest {
|
||||
assertEquals(0, nodesWithText("Disc 1"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun repeatedDiscTitlesGetTheDiscNumber() {
|
||||
setContent(
|
||||
listOf(song("s-a", disc = 1, track = 1), song("s-b", disc = 2, track = 1)),
|
||||
discs = listOf(disc(1, "Live"), disc(2, "Live")),
|
||||
)
|
||||
assertEquals(1, nodesWithText("Live: Disc 1"))
|
||||
assertEquals(1, nodesWithText("Live: Disc 2"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun discHeadersFallBackToTheDiscNumber() {
|
||||
setContent(listOf(song("s-a", disc = 1, track = 1), song("s-b", disc = 2, track = 1)))
|
||||
|
||||
Reference in New Issue
Block a user