damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 3110abc65bd76564a7da6d966ca8056322fd16bf
parent a9f62960ecd130666c8e47b0b85da5612abe9973
Author: OlegAba <mail@olegaba.com>
Date:   Mon, 27 Feb 2023 17:19:47 -0500

Wrap long profile display name

Changelog-Fixed: Wrap long profile display names
Closes: #702

Diffstat:
Mdamus/Views/ProfileName.swift | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/damus/Views/ProfileName.swift b/damus/Views/ProfileName.swift @@ -134,11 +134,13 @@ struct EventProfileName: View { if let real_name = profile?.display_name { Text(real_name) .font(.body.weight(.bold)) - .padding([.trailing], 2) - Text(verbatim: "@\(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey))") + + Text(real_name.isEmpty ? "" : " ") + + + Text(verbatim: "@\(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey))") .foregroundColor(Color("DamusMediumGrey")) .font(eventviewsize_to_font(size)) + } else { Text(verbatim: "\(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey))") .font(eventviewsize_to_font(size))