diff --git a/damus/Views/Profile/ProfileName.swift b/damus/Views/Profile/ProfileName.swift index 0a2fa826..140ce09d 100644 --- a/damus/Views/Profile/ProfileName.swift +++ b/damus/Views/Profile/ProfileName.swift @@ -37,17 +37,19 @@ struct ProfileName: View { let prefix: String let show_nip5_domain: Bool + private let supporterBadgeStyle: SupporterBadge.Style @State var display_name: DisplayName? @State var nip05: NIP05? @State var donation: Int? @State var purple_account: DamusPurple.Account? - init(pubkey: Pubkey, prefix: String = "", damus: DamusState, show_nip5_domain: Bool = true) { + init(pubkey: Pubkey, prefix: String = "", damus: DamusState, show_nip5_domain: Bool = true, supporterBadgeStyle: SupporterBadge.Style = .compact) { self.pubkey = pubkey self.prefix = prefix self.damus_state = damus self.show_nip5_domain = show_nip5_domain + self.supporterBadgeStyle = supporterBadgeStyle self.purple_account = nil } @@ -109,7 +111,7 @@ struct ProfileName: View { .frame(width: 14, height: 14) } - SupporterBadge(percent: supporter(profile: profile), purple_account: self.purple_account, style: .full) + SupporterBadge(percent: supporter(profile: profile), purple_account: self.purple_account, style: supporterBadgeStyle) } diff --git a/damus/Views/Profile/ProfileNameView.swift b/damus/Views/Profile/ProfileNameView.swift index f3feed2b..56153381 100644 --- a/damus/Views/Profile/ProfileNameView.swift +++ b/damus/Views/Profile/ProfileNameView.swift @@ -22,7 +22,7 @@ struct ProfileNameView: View { switch Profile.displayName(profile: profile, pubkey: pubkey) { case .one: HStack(alignment: .center, spacing: spacing) { - ProfileName(pubkey: pubkey, damus: damus) + ProfileName(pubkey: pubkey, damus: damus, supporterBadgeStyle: .full) .font(.title3.weight(.bold)) } case .both(username: _, displayName: let displayName): @@ -30,7 +30,7 @@ struct ProfileNameView: View { .font(.title3.weight(.bold)) HStack(alignment: .center, spacing: spacing) { - ProfileName(pubkey: pubkey, prefix: "@", damus: damus) + ProfileName(pubkey: pubkey, prefix: "@", damus: damus, supporterBadgeStyle: .full) .font(.callout) .foregroundColor(.gray) }