Skip to content

Commit

Permalink
fix video links not showing
Browse files Browse the repository at this point in the history
Signed-off-by: kernelkind <[email protected]>
  • Loading branch information
kernelkind committed Feb 26, 2025
1 parent b4cb44a commit 7ca7dd1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions crates/notedeck_columns/src/ui/note/contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,18 @@ fn render_note_contents(
}

BlockType::Url => {
if !hide_media {
let url = block.as_str().to_string();

let mut found_supported = || -> bool {
let url = block.as_str();
if let Some(cache_type) =
supported_mime_hosted_at_url(&mut img_cache.urls, &url)
supported_mime_hosted_at_url(&mut img_cache.urls, url)
{
images.push((url, cache_type));
images.push((url.to_string(), cache_type));
true
} else {
false
}
} else {
};
if hide_media || !found_supported() {
#[cfg(feature = "profiling")]
puffin::profile_scope!("url contents");
ui.add(Hyperlink::from_label_and_url(
Expand Down

0 comments on commit 7ca7dd1

Please sign in to comment.