refactor + not sure whats up with the double padding

This commit is contained in:
🪞👃🪞 2024-09-10 14:39:53 +03:00
parent 39407c9760
commit c51d1cf643
10 changed files with 388 additions and 393 deletions

View file

@ -20,7 +20,14 @@ pub struct AddSampleModal {
_search: Option<String>,
}
exit!(AddSampleModal);
impl Exit for AddSampleModal {
fn exited (&self) -> bool {
self.exited
}
fn exit (&mut self) {
self.exited = true
}
}
impl Widget for AddSampleModal {
type Engine = Tui;
@ -63,6 +70,7 @@ impl Widget for AddSampleModal {
//Lozenge(Style::default()).draw(to)
}
}
impl Handle<Tui> for AddSampleModal {
fn handle (&mut self, from: &Tui) -> Perhaps<bool> {
if handle_keymap(self, &from.event(), KEYMAP_ADD_SAMPLE)? {