mirror of
https://github.com/figsoda/mmtc
synced 2024-11-22 15:13:03 +00:00
don't fill extra zeros before the minute number
This commit is contained in:
parent
9adbe3be1b
commit
c077953b88
1 changed files with 6 additions and 6 deletions
|
@ -234,17 +234,17 @@ fn flatten(
|
||||||
Texts::CurrentElapsed => {
|
Texts::CurrentElapsed => {
|
||||||
if let Some(Song { elapsed, .. }) = status.song {
|
if let Some(Song { elapsed, .. }) = status.song {
|
||||||
spans.push(Span::styled(
|
spans.push(Span::styled(
|
||||||
format!("{:02}:{:02}", elapsed / 60, elapsed % 60),
|
format!("{}:{:02}", elapsed / 60, elapsed % 60),
|
||||||
style,
|
style,
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Texts::CurrentDuration => {
|
Texts::CurrentDuration => {
|
||||||
if let Some(Track { time, .. }) = current_track {
|
if let Some(Track { time, .. }) = current_track {
|
||||||
spans.push(Span::styled(
|
spans.push(Span::styled(
|
||||||
format!("{:02}:{:02}", time / 60, time % 60),
|
format!("{}:{:02}", time / 60, time % 60),
|
||||||
style,
|
style,
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Texts::CurrentFile => {
|
Texts::CurrentFile => {
|
||||||
|
@ -280,9 +280,9 @@ fn flatten(
|
||||||
Texts::QueueDuration => {
|
Texts::QueueDuration => {
|
||||||
if let Some(Track { time, .. }) = queue_track {
|
if let Some(Track { time, .. }) = queue_track {
|
||||||
spans.push(Span::styled(
|
spans.push(Span::styled(
|
||||||
format!("{:02}:{:02}", time / 60, time % 60),
|
format!("{}:{:02}", time / 60, time % 60),
|
||||||
style,
|
style,
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Texts::QueueFile => {
|
Texts::QueueFile => {
|
||||||
|
|
Loading…
Reference in a new issue