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() None => tasks.clear_filter()
} }
Some('(') => Some('(') => {
match arg { if let Some(arg) = arg {
Some(arg) => if !tasks.track_from(arg) {
if !tasks.track_from(arg) {
continue;
}
None => {
println!("{}", tasks.times_tracked());
continue; continue;
} }
} }
println!("{}", tasks.times_tracked());
continue;
}
Some(')') => { Some(')') => {
tasks.move_to(None); tasks.move_to(None);

View File

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