Fix format of the duration

This commit is contained in:
Maxime NATUREL 2022-04-05 16:07:19 +02:00
parent a412b2128d
commit 3acc139307

View File

@ -90,7 +90,6 @@ object TextUtils {
val minutes = getMinutes(duration)
val seconds = getSeconds(duration)
val builder = StringBuilder()
// TODO do we need Locale ? test with different language setting
when {
hours > 0 -> {
appendHours(context, builder, hours)
@ -108,11 +107,11 @@ object TextUtils {
appendSeconds(context, builder, seconds)
}
}
return builder.toString()
}
private fun appendHours(context: Context, builder: StringBuilder, hours: Int) {
builder.append(hours)
builder.append(context.resources.getQuantityString(R.plurals.time_unit_hour_short, hours))
}