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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user