Show message when no links were found
This commit is contained in:
parent
8846234d8d
commit
7932c2f20b
1 changed files with 6 additions and 0 deletions
|
|
@ -38,6 +38,12 @@ impl LinksState {
|
||||||
|
|
||||||
pub fn widget(&self) -> BoxedWidget {
|
pub fn widget(&self) -> BoxedWidget {
|
||||||
let mut list = self.list.widget().focus(true);
|
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() {
|
for (id, link) in self.links.iter().enumerate() {
|
||||||
list.add_sel(
|
list.add_sel(
|
||||||
id,
|
id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue