damus

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

commit 78a62c8ef0b94f228f1f3838be1cbc36f8631348
parent 8b96b9f4e65ac8905a5979395396b27aefb74115
Author: Terry Yiu <git@tyiu.xyz>
Date:   Fri, 11 Apr 2025 15:05:09 -0400

Clean up code in ProfileName.name_choice

Signed-off-by: Terry Yiu <git@tyiu.xyz>

Diffstat:
Mdamus/Views/Profile/ProfileName.swift | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/damus/Views/Profile/ProfileName.swift b/damus/Views/Profile/ProfileName.swift @@ -67,7 +67,9 @@ struct ProfileName: View { } func name_choice(profile: Profile?) -> String { - return prefix == "@" ? current_display_name(profile: profile).username.truncate(maxLength: 50) : current_display_name(profile: profile).displayName.truncate(maxLength: 50) + let displayName = current_display_name(profile: profile) + let untruncatedName = prefix == "@" ? displayName.username : displayName.displayName + return untruncatedName.truncate(maxLength: 50) } func onlyzapper(profile: Profile?) -> Bool {