fix: round final compact progress fraction to completion
This commit is contained in:
@@ -7,6 +7,7 @@ func compactProgressText(position: Double, duration: Double, format: CompactTitl
|
||||
let position = min(max(0, position), duration)
|
||||
if format == .percentage {
|
||||
let tenths = Int((position / duration * 1000).rounded(.down))
|
||||
if tenths == 999 { return "100.0" }
|
||||
return "\(tenths / 10).\(tenths % 10)"
|
||||
}
|
||||
let total = Int(min(duration, Double(Int.max / 2)))
|
||||
|
||||
Reference in New Issue
Block a user