From 7932c2f20b1f1be95d0a2fff0e0d523645fd2658 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 30 Aug 2022 02:32:08 +0200 Subject: [PATCH] Show message when no links were found --- src/ui/euph/links.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/euph/links.rs b/src/ui/euph/links.rs index 59c23ac..3bb7f08 100644 --- a/src/ui/euph/links.rs +++ b/src/ui/euph/links.rs @@ -38,6 +38,12 @@ impl LinksState { pub fn widget(&self) -> BoxedWidget { let mut list = self.list.widget().focus(true); + if self.links.is_empty() { + list.add_unsel(Text::new(( + "No links found", + ContentStyle::default().grey().italic(), + ))) + } for (id, link) in self.links.iter().enumerate() { list.add_sel( id,