Allow tasks to be canceled

This commit is contained in:
Joscha 2021-12-31 23:57:40 +01:00
parent e0cb1c8f23
commit 0e4ef7fef3
13 changed files with 107 additions and 14 deletions

View file

@ -9,6 +9,7 @@ use super::range::DateRange;
pub enum EntryKind {
Task,
TaskDone(NaiveDate),
TaskCanceled(NaiveDate),
Note,
Birthday(Option<i32>),
}
@ -120,7 +121,7 @@ impl Entries {
}
// Tasks that were finished inside the range
if let EntryKind::TaskDone(done) = entry.kind {
if let EntryKind::TaskDone(done) | EntryKind::TaskCanceled(done) = entry.kind {
if self.range.contains(done) {
return true;
}