Compare commits
No commits in common. "8f3ab1ae80f0e5a5dda21dd74762338528f4e8d2" and "981e22e19105cb3ab65b7ae4bab026618b73aa07" have entirely different histories.
8f3ab1ae80
...
981e22e191
2 changed files with 3 additions and 33 deletions
|
|
@ -1877,35 +1877,6 @@ class Solfa(val sharedScreenModel: SharedScreenModel, private val fileRepository
|
||||||
var anchorNote = ' '
|
var anchorNote = ' '
|
||||||
lineRepeated.toCharArray().forEach {
|
lineRepeated.toCharArray().forEach {
|
||||||
if (it == '§') {
|
if (it == '§') {
|
||||||
val rawSplit = splitBlocks.removeAt(0)
|
|
||||||
val anchorSuffix = anchor.replace(Regex("^[drmfslt]"), "")
|
|
||||||
val processedSplit = rawSplit.replace(Regex("\\{([^\\}]+)\\}")) { match ->
|
|
||||||
val innerContent = match.groupValues[1]
|
|
||||||
val updatedInner = innerContent.replace(Regex("([drmfsltDRFSTz])([,']*)")) { noteMatch ->
|
|
||||||
val n = noteMatch.groupValues[1]
|
|
||||||
val oct = noteMatch.groupValues[2]
|
|
||||||
var res = n
|
|
||||||
res += anchorSuffix
|
|
||||||
if (oct.isEmpty()) {
|
|
||||||
val noteChar = n[0]
|
|
||||||
if (
|
|
||||||
(anchorNote == 'r' && noteChar in listOf('d', 'D'))
|
|
||||||
|| (anchorNote == 'm' && noteChar in listOf('d', 'D', 'r', 'R'))
|
|
||||||
|| (anchorNote == 'f' && noteChar in listOf('d', 'D', 'r', 'R', 'm', 'M'))
|
|
||||||
|| (anchorNote == 's' && noteChar !in listOf('s', 'S', 'l', 'L', 't', 'T'))
|
|
||||||
|| (anchorNote == 'l' && noteChar !in listOf('l', 'L', 't', 'T'))
|
|
||||||
|| (anchorNote == 't' && noteChar !in listOf('t', 'T'))
|
|
||||||
) {
|
|
||||||
res += '\''
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
res += oct
|
|
||||||
}
|
|
||||||
res.replace(",'", "").replace("',", "").replace(",'", "").replace("',", "")
|
|
||||||
}
|
|
||||||
"{$updatedInner}"
|
|
||||||
}
|
|
||||||
splitBlocks.add(processedSplit)
|
|
||||||
noteChar2 += "§"
|
noteChar2 += "§"
|
||||||
return@forEach
|
return@forEach
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ fun SimpleDrawerContent(
|
||||||
contentTitle = di?.contentTitle ?: "chant introuvable",
|
contentTitle = di?.contentTitle ?: "chant introuvable",
|
||||||
selected = di != null && di.path == activePath,
|
selected = di != null && di.path == activePath,
|
||||||
enabled = di != null,
|
enabled = di != null,
|
||||||
stzS = song.entry.stanzas.toSet(),
|
stz = song.entry.stanzas,
|
||||||
onClick = {
|
onClick = {
|
||||||
if (di != null) {
|
if (di != null) {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
|
|
@ -664,11 +664,10 @@ fun DrawerPlaylistSongRow(
|
||||||
contentTitle: String,
|
contentTitle: String,
|
||||||
selected: Boolean,
|
selected: Boolean,
|
||||||
enabled: Boolean,
|
enabled: Boolean,
|
||||||
stzS: Set<Int>,
|
stz: List<Int>,
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val stz = summarizeVerses(stzS)
|
val verses = if(stz.isEmpty()) "" else ": ${stz.joinToString(", ")}"
|
||||||
val verses = if(stzS.isEmpty()) "" else ": ${stz}"
|
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = {
|
icon = {
|
||||||
Text("♪", fontSize = 20.sp)
|
Text("♪", fontSize = 20.sp)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue