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