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:
@@ -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