mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-24 13:41:08 +07:00
Fix wrong Duration short formatting (#7167)
This commit is contained in:
parent
0585194eaf
commit
89a7cc7246
@ -51,7 +51,7 @@ private fun Duration.toParts(): SortedMap<ChronoUnit, Long> {
|
||||
fun Duration.formatShort(): String {
|
||||
val parts = toParts()
|
||||
for ((unit, part) in parts) {
|
||||
if (part > 2) return "[${part}] $unit".tr()
|
||||
if (part > 0) return "[${part}] $unit".tr()
|
||||
}
|
||||
return "[${parts[ChronoUnit.SECONDS]}] ${ChronoUnit.SECONDS}".tr()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user