fix for empty media url
This commit is contained in:
parent
dd86be6740
commit
5563a293f5
1 changed files with 7 additions and 1 deletions
|
@ -71,7 +71,13 @@ pub fn content_area(content: &Vec<Content>) -> iced::widget::Container<Message>
|
|||
pub fn media_view(state: &ui::State) -> Element<Message> {
|
||||
match state.current_item.clone().unwrap().media {
|
||||
Some(m) => {
|
||||
text(format!("<Media is available:{}>",m)).into()
|
||||
if m.len() > 0{
|
||||
text(format!("<Media is available:{}>",m)).into()
|
||||
}
|
||||
else {
|
||||
text("".to_owned()).into()
|
||||
|
||||
}
|
||||
}
|
||||
None => {
|
||||
text("".to_owned()).into()
|
||||
|
|
Loading…
Reference in a new issue