remove Task, count changes explicitly

This commit is contained in:
🪞👃🪞 2025-04-06 19:13:25 +03:00
parent 4de94beafb
commit 84f183ab84
7 changed files with 23 additions and 40 deletions

View file

@ -11,8 +11,14 @@ impl Taggart {
choice: (choice + 1) % 3
}) },
press!(Enter) => match choice {
0 => { self.tasks = vec![]; self.mode = None; },
1 => { self.mode = None },
0 => {
todo!("clear modified_tag");
//self.tasks = vec![];
self.mode = None;
},
1 => {
self.mode = None
},
2 => todo!(),
_ => unreachable!(),
},
@ -20,7 +26,7 @@ impl Taggart {
}
}
pub fn save_begin (&mut self) {
if self.tasks.len() > 0 {
if self.changes > 0 {
self.mode = Some(Mode::Save { choice: 1 })
}
}