Skip to content

Commit 8413f6f

Browse files
author
Reed Es
committed
explicit names for parameters
1 parent bdfabae commit 8413f6f

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ iOS
2929

3030
Swift open-source libraries (by the same author):
3131

32+
* [SwiftDetailer](https://github.com/openalloc/SwiftDetailer) - multi-platform SwiftUI component for editing fielded data
3233
* [SwiftTabler](https://github.com/openalloc/SwiftTabler) - multi-platform SwiftUI component for displaying (and interacting with) tabular data
3334
* [AllocData](https://github.com/openalloc/AllocData) - standardized data formats for investing-focused apps and tools
3435
* [FINporter](https://github.com/openalloc/FINporter) - library and command-line tool to transform various specialized finance-related formats to the standardized schema of AllocData

Sources/EditDetailerContextMenu.swift

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
//
1818

1919
import SwiftUI
20-
import Detailer
2120

2221
public struct EditDetailerContextMenu<Element>: ViewModifier
2322
where Element: Identifiable
@@ -34,9 +33,9 @@ public struct EditDetailerContextMenu<Element>: ViewModifier
3433

3534
public init(_ element: Element,
3635
_ toEdit: Binding<Element?>,
37-
_ canEdit: @escaping CanEdit = { _ in true },
38-
_ canDelete: @escaping CanDelete = { _ in true },
39-
_ onDelete: OnDelete? = nil)
36+
canEdit: @escaping CanEdit = { _ in true },
37+
canDelete: @escaping CanDelete = { _ in true },
38+
onDelete: OnDelete? = nil)
4039
{
4140
self.element = element
4241
_toEdit = toEdit
@@ -48,15 +47,15 @@ public struct EditDetailerContextMenu<Element>: ViewModifier
4847
// convenience to unwrap bound element
4948
public init(_ element: Binding<Element>,
5049
_ toEdit: Binding<Element?>,
51-
_ canEdit: @escaping CanEdit = { _ in true },
52-
_ canDelete: @escaping CanDelete = { _ in true },
53-
_ onDelete: OnDelete? = nil)
50+
canEdit: @escaping CanEdit = { _ in true },
51+
canDelete: @escaping CanDelete = { _ in true },
52+
onDelete: OnDelete? = nil)
5453
{
5554
self.init(element.wrappedValue,
5655
toEdit,
57-
canEdit,
58-
canDelete,
59-
onDelete)
56+
canEdit: canEdit,
57+
canDelete: canDelete,
58+
onDelete: onDelete)
6059
}
6160

6261
private var isDeleteAvailable: Bool {

Sources/EditDetailerSwipeMenu.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public struct EditDetailerSwipeMenu<Element>: ViewModifier
3434

3535
public init(_ element: Element,
3636
_ toEdit: Binding<Element?>,
37-
_ canEdit: @escaping CanEdit = { _ in true },
38-
_ canDelete: @escaping CanDelete = { _ in true },
39-
_ onDelete: OnDelete? = nil)
37+
canEdit: @escaping CanEdit = { _ in true },
38+
canDelete: @escaping CanDelete = { _ in true },
39+
onDelete: OnDelete? = nil)
4040
{
4141
self.element = element
4242
_toEdit = toEdit
@@ -48,15 +48,15 @@ public struct EditDetailerSwipeMenu<Element>: ViewModifier
4848
// convenience to unwrap bound element
4949
public init(_ element: Binding<Element>,
5050
_ toEdit: Binding<Element?>,
51-
_ canEdit: @escaping CanEdit = { _ in true },
52-
_ canDelete: @escaping CanDelete = { _ in true },
53-
_ onDelete: OnDelete? = nil)
51+
canEdit: @escaping CanEdit = { _ in true },
52+
canDelete: @escaping CanDelete = { _ in true },
53+
onDelete: OnDelete? = nil)
5454
{
5555
self.init(element.wrappedValue,
5656
toEdit,
57-
canEdit,
58-
canDelete,
59-
onDelete)
57+
canEdit: canEdit,
58+
canDelete: canDelete,
59+
onDelete: onDelete)
6060
}
6161

6262
private var isDeleteAvailable: Bool {

0 commit comments

Comments
 (0)