damus

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

commit 85e797a0541ad0251a89982487f719cf71123f52
parent 9f52e2c2469cb875308d71c7acc9a1c2d84eff1c
Author: Joel Klabo <joelklabo@gmail.com>
Date:   Thu, 23 Feb 2023 16:48:15 -0800

Embed in ScrollView

Diffstat:
Mdamus/Views/ParicipantsView.swift | 60+++++++++++++++++++++++++++++++-----------------------------
1 file changed, 31 insertions(+), 29 deletions(-)

diff --git a/damus/Views/ParicipantsView.swift b/damus/Views/ParicipantsView.swift @@ -36,41 +36,43 @@ struct ParticipantsView: View { Spacer() } VStack { - ForEach(originalReferences.pRefs) { participant in - let pubkey = participant.id - HStack { - ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles) - - VStack(alignment: .leading) { - let profile = damus_state.profiles.lookup(id: pubkey) - ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false) - if let about = profile?.about { - Text(FollowUserView.markdown.process(about)) - .lineLimit(3) - .font(.footnote) + ScrollView { + ForEach(originalReferences.pRefs) { participant in + let pubkey = participant.id + HStack { + ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles) + + VStack(alignment: .leading) { + let profile = damus_state.profiles.lookup(id: pubkey) + ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false) + if let about = profile?.about { + Text(FollowUserView.markdown.process(about)) + .lineLimit(3) + .font(.footnote) + } } + + Spacer() + + Image(systemName: "checkmark.circle.fill") + .font(.system(size: 30)) + .foregroundColor(references.contains(participant) ? .purple : .gray) } - - Spacer() - - Image(systemName: "checkmark.circle.fill") - .font(.system(size: 30)) - .foregroundColor(references.contains(participant) ? .purple : .gray) - } - .onTapGesture { - if references.contains(participant) { - references = references.filter { - $0 != participant - } - } else { + .onTapGesture { if references.contains(participant) { - // Don't add it twice + references = references.filter { + $0 != participant + } } else { - references.append(participant) + if references.contains(participant) { + // Don't add it twice + } else { + references.append(participant) + } } } - } - } + } + } } Spacer() }