forked from janek/mostr
1
0
Fork 0

fix(main): better feedback after adjusting timetracking

This commit is contained in:
xeruf 2024-08-14 15:36:54 +03:00
parent be582cb536
commit f5aca3eca8
2 changed files with 8 additions and 11 deletions

View File

@ -470,18 +470,15 @@ async fn main() {
None => tasks.clear_filter()
}
Some('(') =>
match arg {
Some(arg) =>
if !tasks.track_from(arg) {
continue;
}
None => {
println!("{}", tasks.times_tracked());
Some('(') => {
if let Some(arg) = arg {
if !tasks.track_from(arg) {
continue;
}
}
println!("{}", tasks.times_tracked());
continue;
}
Some(')') => {
tasks.move_to(None);

View File

@ -698,7 +698,7 @@ impl Tasks {
} else if let Ok(date) = DateTime::parse_from_rfc3339(str) {
self.track_at(Timestamp::from(date.to_utc().timestamp() as u64));
} else {
warn!("Cannot parse {str}");
warn!("Cannot parse time from {str}");
return false;
}
true