Embed in ScrollView
This commit is contained in:
committed by
William Casarin
parent
9f52e2c246
commit
85e797a054
@@ -36,41 +36,43 @@ struct ParticipantsView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
VStack {
|
VStack {
|
||||||
ForEach(originalReferences.pRefs) { participant in
|
ScrollView {
|
||||||
let pubkey = participant.id
|
ForEach(originalReferences.pRefs) { participant in
|
||||||
HStack {
|
let pubkey = participant.id
|
||||||
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles)
|
HStack {
|
||||||
|
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles)
|
||||||
VStack(alignment: .leading) {
|
|
||||||
let profile = damus_state.profiles.lookup(id: pubkey)
|
VStack(alignment: .leading) {
|
||||||
ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false)
|
let profile = damus_state.profiles.lookup(id: pubkey)
|
||||||
if let about = profile?.about {
|
ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false)
|
||||||
Text(FollowUserView.markdown.process(about))
|
if let about = profile?.about {
|
||||||
.lineLimit(3)
|
Text(FollowUserView.markdown.process(about))
|
||||||
.font(.footnote)
|
.lineLimit(3)
|
||||||
|
.font(.footnote)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
Image(systemName: "checkmark.circle.fill")
|
||||||
|
.font(.system(size: 30))
|
||||||
|
.foregroundColor(references.contains(participant) ? .purple : .gray)
|
||||||
}
|
}
|
||||||
|
.onTapGesture {
|
||||||
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 {
|
|
||||||
if references.contains(participant) {
|
if references.contains(participant) {
|
||||||
// Don't add it twice
|
references = references.filter {
|
||||||
|
$0 != participant
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
references.append(participant)
|
if references.contains(participant) {
|
||||||
|
// Don't add it twice
|
||||||
|
} else {
|
||||||
|
references.append(participant)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user