mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
fix inconsistent label
This commit is contained in:
parent
d3d82a7d0f
commit
1e54f20d03
@ -7,20 +7,8 @@ import com.github.libretube.util.ThemeHelper
|
|||||||
|
|
||||||
fun TextView.setFormattedDuration(duration: Long) {
|
fun TextView.setFormattedDuration(duration: Long) {
|
||||||
val text = if (duration < 0L) {
|
val text = if (duration < 0L) {
|
||||||
this.setBackgroundColor(
|
|
||||||
ThemeHelper.getThemeColor(
|
|
||||||
context,
|
|
||||||
R.attr.colorPrimaryDark
|
|
||||||
)
|
|
||||||
)
|
|
||||||
this.context.getString(R.string.live)
|
this.context.getString(R.string.live)
|
||||||
} else if (duration in 0L..60L) {
|
} else if (duration in 0L..60L) {
|
||||||
this.setBackgroundColor(
|
|
||||||
ThemeHelper.getThemeColor(
|
|
||||||
context,
|
|
||||||
R.attr.colorPrimaryDark
|
|
||||||
)
|
|
||||||
)
|
|
||||||
this.context.getString(R.string.yt_shorts)
|
this.context.getString(R.string.yt_shorts)
|
||||||
} else {
|
} else {
|
||||||
DateUtils.formatElapsedTime(duration)
|
DateUtils.formatElapsedTime(duration)
|
||||||
|
Loading…
Reference in New Issue
Block a user