diff options
| author | lukeflo | 2025-07-05 22:29:18 +0200 |
|---|---|---|
| committer | lukeflo | 2025-07-05 22:29:18 +0200 |
| commit | 2990df627ff54f01bafdcab767c0a73198e9e6cc (patch) | |
| tree | 8bdb05d9d4502bff9c3240958b8915df6026acda /src/app.rs | |
| parent | 80c04702012cb1a43711d559e8ffbe9e250b1a57 (diff) | |
| download | bibiman-2990df627ff54f01bafdcab767c0a73198e9e6cc.tar.gz bibiman-2990df627ff54f01bafdcab767c0a73198e9e6cc.zip | |
create note function impl
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -192,7 +192,8 @@ impl App { } Some(PopupKind::OpenRes) | Some(PopupKind::AppendToFile) - | Some(PopupKind::YankItem) => { + | Some(PopupKind::YankItem) + | Some(PopupKind::CreateNote) => { self.bibiman.popup_area.popup_state.scroll_down_by(1) } _ => {} @@ -213,7 +214,8 @@ impl App { } Some(PopupKind::OpenRes) | Some(PopupKind::AppendToFile) - | Some(PopupKind::YankItem) => { + | Some(PopupKind::YankItem) + | Some(PopupKind::CreateNote) => { self.bibiman.popup_area.popup_state.scroll_up_by(1) } _ => {} @@ -273,6 +275,8 @@ impl App { self.bibiman.close_popup(); } else if let Some(PopupKind::YankItem) = self.bibiman.popup_area.popup_kind { self.bibiman.close_popup(); + } else if let Some(PopupKind::CreateNote) = self.bibiman.popup_area.popup_kind { + self.bibiman.close_popup(); } } else { self.bibiman.reset_current_list(); @@ -291,6 +295,8 @@ impl App { self.bibiman.append_entry_to_file(cfg)? } else if let Some(PopupKind::YankItem) = self.bibiman.popup_area.popup_kind { self.bibiman.yank_entry_field()? + } else if let Some(PopupKind::CreateNote) = self.bibiman.popup_area.popup_kind { + self.bibiman.create_note(cfg)? } } } |
