From d7ffebe3aa57de6e6f2f1564751b47a1f155aa39 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Fri, 30 Jun 2023 13:20:03 +1200 Subject: [PATCH] Render naddr1 and nrelay1 NostrUrls special (wrong still, but this reminds us to make these links) --- src/ui/feed/note/content.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ui/feed/note/content.rs b/src/ui/feed/note/content.rs index ae19ebff..d0f23885 100644 --- a/src/ui/feed/note/content.rs +++ b/src/ui/feed/note/content.rs @@ -30,8 +30,12 @@ pub(super) fn render_content( ContentSegment::NostrUrl(nurl) => { match &nurl.0 { NostrBech32::EventAddr(ea) => { - // FIXME - ui.label(ea.as_bech32_string()); + // FIXME - we should link to the event instead + ui.label( + RichText::new( + format!("nostr:{}", ea.as_bech32_string()) + ).underline() + ); } NostrBech32::EventPointer(ep) => { let mut render_link = true; @@ -98,8 +102,12 @@ pub(super) fn render_content( render_profile_link(app, ui, &(*pk).into()); } NostrBech32::Relay(url) => { - // FIXME - ui.label(url.as_bech32_string()); + // FIXME - we should link to the relay page once we have those + ui.label( + RichText::new( + format!("nostr:{}", url.as_bech32_string()) + ).underline() + ); } } }