aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorlukeflo2025-06-29 14:20:10 +0200
committerlukeflo2025-06-29 14:20:10 +0200
commit40629e0c2dc62bfb1786cb1c18bc68ed4c23e9ac (patch)
tree7aa2e7ef735e7020f7d1887af5e51448c7465f58 /src/app.rs
parent2f76849512fd36dc7c49b6c20cc9c598739c9176 (diff)
downloadbibiman-40629e0c2dc62bfb1786cb1c18bc68ed4c23e9ac.tar.gz
bibiman-40629e0c2dc62bfb1786cb1c18bc68ed4c23e9ac.zip
working note-opening action. needs refinement: errors and ui
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/app.rs b/src/app.rs
index d10e4f8..5f2d16b 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -343,7 +343,8 @@ impl App {
.unwrap();
let entry = self.bibiman.entry_table.entry_table_items[idx].clone();
let mut items: Vec<(String, String)> = vec![];
- if entry.filepath.is_some() || entry.doi_url.is_some() {
+ if entry.filepath.is_some() || entry.doi_url.is_some() || entry.notes.is_some()
+ {
if entry.doi_url.is_some() {
items.push((
"Weblink (DOI/URL): ".into(),
@@ -370,6 +371,11 @@ impl App {
))
});
}
+ if entry.notes.is_some() {
+ entry.notes.unwrap().iter().for_each(|n| {
+ items.push(("Note: ".into(), n.clone().into_string().unwrap()));
+ });
+ }
self.bibiman
.open_popup(PopupKind::OpenRes, None, None, Some(items))?;