forked from janek/mostr
fix(main): better feedback after adjusting timetracking
This commit is contained in:
parent
be582cb536
commit
f5aca3eca8
15
src/main.rs
15
src/main.rs
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue