mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-09 00:23:20 +01:00
Fix crash when lines are out of order by sorting (#872)
This commit is contained in:
1 parent
7765824db0
commit
3b281334c4
1 file changed
+4
-1
@@ -29,7 +29,10 @@ struct LyricsDto {
|
||||
]
|
||||
}
|
||||
else {
|
||||
lyricsData.lines = lines.map { line in
|
||||
let sortedLines = lines.sorted {
|
||||
($0.offsetMs ?? 0) < ($1.offsetMs ?? 0)
|
||||
}
|
||||
lyricsData.lines = sortedLines.map { line in
|
||||
LyricsLine.with {
|
||||
$0.content = (shouldRomanize && romanization == .canBeRomanized)
|
||||
? line.content.applyingTransform(.toLatin, reverse: false)!
|
||||
|
||||
Reference in new issue
Block a user