aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorlukeflo2025-07-05 22:29:18 +0200
committerlukeflo2025-07-05 22:29:18 +0200
commit2990df627ff54f01bafdcab767c0a73198e9e6cc (patch)
tree8bdb05d9d4502bff9c3240958b8915df6026acda /src/app.rs
parent80c04702012cb1a43711d559e8ffbe9e250b1a57 (diff)
downloadbibiman-2990df627ff54f01bafdcab767c0a73198e9e6cc.tar.gz
bibiman-2990df627ff54f01bafdcab767c0a73198e9e6cc.zip
create note function impl
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/app.rs b/src/app.rs
index 14cc864..01424bc 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -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)?
}
}
}