1
0
mirror of git://jb55.com/damus synced 2024-09-29 16:30:44 +00:00

Separate NIP-05 and username/display name onto their own lines.

Closes: https://github.com/damus-io/damus/pull/1534
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
Grimless 2023-09-04 00:54:13 -04:00 committed by William Casarin
parent b18a0c573e
commit fb8c470e9d

View File

@ -80,23 +80,25 @@ struct ProfileName: View {
}
var body: some View {
HStack(spacing: 2) {
Text(verbatim: "\(prefix)\(name_choice)")
.font(.body)
.fontWeight(prefix == "@" ? .none : .bold)
VStack(alignment: .leading, spacing: 2) {
HStack(spacing: 2) {
Text(verbatim: "\(prefix)\(name_choice)")
.font(.body)
.fontWeight(prefix == "@" ? .none : .bold)
if let friend = friend_type, current_nip05 == nil {
FriendIcon(friend: friend)
}
if onlyzapper {
Image("zap-hashtag")
.frame(width: 14, height: 14)
}
if let supporter {
SupporterBadge(percent: supporter)
}
}
if let nip05 = current_nip05 {
NIP05Badge(nip05: nip05, pubkey: pubkey, contacts: damus_state.contacts, show_domain: show_nip5_domain, profiles: damus_state.profiles)
}
if let friend = friend_type, current_nip05 == nil {
FriendIcon(friend: friend)
}
if onlyzapper {
Image("zap-hashtag")
.frame(width: 14, height: 14)
}
if let supporter {
SupporterBadge(percent: supporter)
}
}
.onReceive(handle_notify(.profile_updated)) { update in
if update.pubkey != pubkey {