浏览代码

Trim leading zero in position and duration texts in player controls

vfsfitvnm 2 年之前
父节点
当前提交
b7046e3217
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/player/Controls.kt

+ 2 - 2
app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/player/Controls.kt

@@ -150,7 +150,7 @@ fun Controls(
                 .fillMaxWidth()
         ) {
             BasicText(
-                text = DateUtils.formatElapsedTime((scrubbingPosition ?: position) / 1000),
+                text = DateUtils.formatElapsedTime((scrubbingPosition ?: position) / 1000).removePrefix("0"),
                 style = typography.xxs.semiBold,
                 maxLines = 1,
                 overflow = TextOverflow.Ellipsis,
@@ -158,7 +158,7 @@ fun Controls(
 
             if (duration != C.TIME_UNSET) {
                 BasicText(
-                    text = DateUtils.formatElapsedTime(duration / 1000),
+                    text = DateUtils.formatElapsedTime(duration / 1000).removePrefix("0"),
                     style = typography.xxs.semiBold,
                     maxLines = 1,
                     overflow = TextOverflow.Ellipsis,