From 3110abc65bd76564a7da6d966ca8056322fd16bf Mon Sep 17 00:00:00 2001 From: OlegAba Date: Mon, 27 Feb 2023 17:19:47 -0500 Subject: [PATCH] Wrap long profile display name Changelog-Fixed: Wrap long profile display names Closes: #702 --- damus/Views/ProfileName.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/damus/Views/ProfileName.swift b/damus/Views/ProfileName.swift index dfabc9d5..aaa69362 100644 --- 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))