Skip to content

Commit 3f8c221

Browse files
committed
Make properties non-private.
To allow the compiler to synthesize the default initializer.
1 parent 0dc8ff2 commit 3f8c221

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Shared/Supporting Files/Views/CategoriesView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private extension CategoriesView {
6565
SampleDetailView(sample: sample)
6666
.id(sample.name)
6767
} label: {
68-
SampleRow(sample: sample, query: "")
68+
SampleRow(name: AttributedString(sample.name), description: AttributedString(sample.description))
6969
}
7070
}
7171
.listStyle(.sidebar)

Shared/Supporting Files/Views/SampleRow.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import SwiftUI
1616

1717
struct SampleRow: View {
1818
/// The name string of the sample with attributes.
19-
private let name: AttributedString
19+
let name: AttributedString
2020

2121
/// The description string of the sample with attributes.
22-
private let description: AttributedString
22+
let description: AttributedString
2323

2424
/// A Boolean value that indicates whether to show the sample's description.
2525
@State private var isShowingDescription = false

0 commit comments

Comments
 (0)