1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import SwiftUI
struct PeopleListRows: View {
@AppStorage("handlesOnly") private var handlesOnly = false
let accounts: [Post.Author]
let rowIdentifierPrefix: String
let openProfile: (String) -> Void
var body: some View {
ForEach(accounts) { author in
let open = { openProfile(author.id) }
AccountSummaryRow(
author: author, bio: author.bio,
avatarIdentifier: "\(rowIdentifierPrefix)Avatar-\(author.id)",
contentIdentifier: "\(rowIdentifierPrefix)-\(author.id)",
openProfile: open
) {
VStack(alignment: .leading, spacing: 3) {
Text(DisplayPreferences(handlesOnly: handlesOnly).name(author))
.appFont(.headline).foregroundStyle(.primary)
if !handlesOnly {
Text("@\(author.handle)").appFont(.subheadline).foregroundStyle(.secondary)
}
}
}
.modifier(ContentListRowStyle(openPost: open))
.listRowInsets(EdgeInsets())
.listRowSeparator(.hidden)
}
}
}