Prechádzať zdrojové kódy

Trim leading zero in position and duration texts in player controls

vfsfitvnm 2 rokov pred
rodič
commit
b7046e3217

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

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