Update files following swiftformat upgrade

This commit is contained in:
Stefan Ceriu
2026-01-27 08:47:03 +02:00
committed by Stefan Ceriu
parent fe189fcfed
commit 23062901c0
343 changed files with 1502 additions and 1048 deletions
@@ -33,7 +33,9 @@ struct ListInlinePicker<SelectedValue: Hashable>: View {
// MARK: - Previews
struct ListInlinePicker_Previews: PreviewProvider, TestablePreview {
static var previews: some View { Preview() }
static var previews: some View {
Preview()
}
struct Preview: View {
@State var selection = "Item 1"
@@ -154,7 +154,7 @@ public struct ListRow<Icon: View, DetailsIcon: View, CustomContent: View, Select
// MARK: - Initialisers
// Normal row with a details icon
/// Normal row with a details icon
public extension ListRow where CustomContent == EmptyView {
init(label: ListRowLabel<Icon>,
details: ListRowDetails<DetailsIcon>? = nil,
@@ -173,7 +173,7 @@ public extension ListRow where CustomContent == EmptyView {
}
}
// Normal row without a details icon.
/// Normal row without a details icon.
public extension ListRow where DetailsIcon == EmptyView, CustomContent == EmptyView {
init(label: ListRowLabel<Icon>,
details: ListRowDetails<DetailsIcon>? = nil,
@@ -192,7 +192,7 @@ public extension ListRow where DetailsIcon == EmptyView, CustomContent == EmptyV
}
}
// Custom row without a label or details label.
/// Custom row without a label or details label.
public extension ListRow where Icon == EmptyView, DetailsIcon == EmptyView {
init(kind: Kind<CustomContent, SelectionValue>) {
label = ListRowLabel()
@@ -449,7 +449,7 @@ public struct ListRow_Previews: PreviewProvider, TestablePreview {
}
}
@ViewBuilder static var othersSection: some View {
static var othersSection: some View {
Section {
ListRow(kind: .custom {
Text("This is a custom row")
@@ -52,7 +52,10 @@ public struct ListRowAccessory: View {
let kind: Kind
/// Negative padding added to prevent the accessory interfering with the row's padding.
private var verticalPaddingFix: CGFloat { -4 }
private var verticalPaddingFix: CGFloat {
-4
}
/// Absolute bodge until we have the circle icon in Compound.
@ScaledMetric private var circleOverlayInsets = 5
@@ -79,7 +79,9 @@ public struct ListRowLabel<Icon: View>: View {
return role == .destructive ? .compound.textCriticalPrimary : .compound.textPrimary
}
var titleLineLimit: Int? { layout == .avatar ? 1 : lineLimit }
var titleLineLimit: Int? {
layout == .avatar ? 1 : lineLimit
}
var statusColor: Color {
isEnabled ? .compound.textSecondary : .compound.textDisabled
@@ -38,7 +38,9 @@ public struct ListRowTrailingSection<Icon: View>: View {
private var accessory: ListRowAccessory?
@ScaledMetric private var iconSize = 24
private var hideAccessory: Bool { isWaiting && accessory?.kind == .unselected }
private var hideAccessory: Bool {
isWaiting && accessory?.kind == .unselected
}
init(_ details: ListRowDetails<Icon>?, accessory: ListRowAccessory? = nil) {
title = details?.title