mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-12 09:53:52 +01:00
Do not append 0 values when formatting duration
This commit is contained in:
parent
c432985cb4
commit
8b628229ed
@ -93,15 +93,21 @@ object TextUtils {
|
||||
when {
|
||||
hours > 0 -> {
|
||||
appendHours(context, builder, hours)
|
||||
builder.append(" ")
|
||||
appendMinutes(context, builder, minutes)
|
||||
builder.append(" ")
|
||||
appendSeconds(context, builder, seconds)
|
||||
if(minutes > 0) {
|
||||
builder.append(" ")
|
||||
appendMinutes(context, builder, minutes)
|
||||
}
|
||||
if(seconds > 0) {
|
||||
builder.append(" ")
|
||||
appendSeconds(context, builder, seconds)
|
||||
}
|
||||
}
|
||||
minutes > 0 -> {
|
||||
appendMinutes(context, builder, minutes)
|
||||
builder.append(" ")
|
||||
appendSeconds(context, builder, seconds)
|
||||
if(seconds > 0) {
|
||||
builder.append(" ")
|
||||
appendSeconds(context, builder, seconds)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
appendSeconds(context, builder, seconds)
|
||||
|
Loading…
Reference in New Issue
Block a user