notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 7ca7dd156b5033147203d874c52bacf5b9b571f8
parent b4cb44a3d5c8e5b8cded7f9b931e1688c159852b
Author: kernelkind <kernelkind@gmail.com>
Date:   Wed, 26 Feb 2025 16:09:39 -0500

fix video links not showing

Signed-off-by: kernelkind <kernelkind@gmail.com>

Diffstat:
Mcrates/notedeck_columns/src/ui/note/contents.rs | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/crates/notedeck_columns/src/ui/note/contents.rs b/crates/notedeck_columns/src/ui/note/contents.rs @@ -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(