commit edb23e4e7016465ad7e9238673fe7d039e2b2b2a
parent 82fba88cc4131f1b2d67c9ac5b56793d634a48e1
Author: Daniel D’Aquino <daniel@daquino.me>
Date: Fri, 13 Oct 2023 12:24:55 -0700
ui: prefix username with `@` character, fix spacing
Closes: https://github.com/damus-io/damus/issues/1559
Changelog-Fixed: Add more spacing between display name and username, and prefix username with `@` character
Diffstat:
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/damus/Views/Profile/EventProfileName.swift b/damus/Views/Profile/EventProfileName.swift
@@ -66,12 +66,14 @@ struct EventProfileName: View {
.font(.body.weight(.bold))
case .both(username: let username, displayName: let displayName):
- Text(verbatim: displayName)
- .font(.body.weight(.bold))
-
- Text(verbatim: username)
- .foregroundColor(.gray)
- .font(eventviewsize_to_font(size, font_size: damus_state.settings.font_size))
+ HStack(spacing: 6) {
+ Text(verbatim: displayName)
+ .font(.body.weight(.bold))
+
+ Text(verbatim: "@\(username)")
+ .foregroundColor(.gray)
+ .font(eventviewsize_to_font(size, font_size: damus_state.settings.font_size))
+ }
}
/*