Skip to content

Commit

Permalink
feat: don't show minutes and seconds if ETA is >0d (#27, #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanaden authored Jun 21, 2024
1 parent 580187b commit 5ad745a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rm-main/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ pub fn seconds_to_human_format(seconds: i64) -> String {
let hours = rest / HOUR;
rest %= HOUR;
curr_string = format!("{curr_string}{hours}h");
// skip minutes & seconds for multi-day durations
if seconds > DAY {
return curr_string;
}
}

if seconds > MINUTE {
Expand Down

0 comments on commit 5ad745a

Please sign in to comment.