From 9bce9fdc82cbcb4bdc84d3490d7cc755aae935f3 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Fri, 8 Nov 2024 15:36:56 +0100 Subject: simplify bibdata sourcing --- src/tui/ui.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tui') diff --git a/src/tui/ui.rs b/src/tui/ui.rs index 79d1ecc..f2091a5 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -610,16 +610,16 @@ pub fn render_selected_item(app: &mut App, frame: &mut Frame, rect: Rect) { } lines.push(Line::from(content)) } - if !cur_entry.doi_url.is_empty() || !cur_entry.filepath.is_empty() { + if cur_entry.doi_url.is_some() || cur_entry.filepath.is_some() { lines.push(Line::raw("")); } - if !cur_entry.doi_url.is_empty() { + if cur_entry.doi_url.is_some() { lines.push(Line::from(vec![ Span::styled("DOI/URL: ", style_value), Span::styled(cur_entry.doi_url(), INFO_STYLE_DOI.underlined()), ])); } - if !cur_entry.filepath.is_empty() { + if cur_entry.filepath.is_some() { lines.push(Line::from(vec![ Span::styled("File: ", style_value), Span::styled(cur_entry.filepath(), INFO_STYLE_FILE), -- cgit v1.2.3