Add mention parsing and fine-grained text selection on description in ProfileView

Changelog-Added: Add mention parsing and fine-grained text selection on description in ProfileView
Closes: #1172
This commit is contained in:
tyiu authored and William Casarin committed 2023-05-26 10:35:18 -07:00
1 parent f9a572faa2
commit 0552c24108
5 files changed
+22 -5

No files matched your search

+3 -1
View File
@@ -43,7 +43,9 @@ struct UserView: View {
let profile = damus_state.profiles.lookup(id: pubkey)
ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_nip5_domain: false)
if let about = profile?.about {
Text(about)
let blocks = parse_mentions(content: about, tags: [])
let about_string = render_blocks(blocks: blocks, profiles: damus_state.profiles).content.attributed
Text(about_string)
.lineLimit(3)
.font(.footnote)
}