diff --git a/Sources/Classes/Views/SeparatorRowBox/SeparatorRowBox.swift b/Sources/Classes/Views/SeparatorRowBox/SeparatorRowBox.swift index f87ca389..cf8674f8 100644 --- a/Sources/Classes/Views/SeparatorRowBox/SeparatorRowBox.swift +++ b/Sources/Classes/Views/SeparatorRowBox/SeparatorRowBox.swift @@ -37,7 +37,9 @@ public final class SeparatorRowBox { /// - parameter row: TableRow which `cell` conforms to SeparatorCell public init(row: TableRow) where T: SeparatorCell { self.row = row - setSeparatorHandler = row.set + setSeparatorHandler = { separatorType in + row.set(separatorType: separatorType) + } } } diff --git a/Sources/Extensions/TableDirector/TableRow+AppearanceExtension.swift b/Sources/Extensions/TableDirector/TableRow+AppearanceExtension.swift index 715c34de..5060f6fe 100644 --- a/Sources/Extensions/TableDirector/TableRow+AppearanceExtension.swift +++ b/Sources/Extensions/TableDirector/TableRow+AppearanceExtension.swift @@ -26,7 +26,7 @@ fileprivate let updateAppearanceActionId = "TableRowUpdateAppearanceActionId" public extension TableRow where CellType: AppearanceProtocol { - func with(appearance: CellType.Appearance) -> Self { + @discardableResult func set(appearance: CellType.Appearance) -> Self { removeAction(forActionId: updateAppearanceActionId) let action = TableRowAction(.configure) { options in @@ -39,8 +39,4 @@ public extension TableRow where CellType: AppearanceProtocol { return self } - func set(appearance: CellType.Appearance) { - _ = with(appearance: appearance) - } - } diff --git a/Sources/Extensions/TableDirector/TableRow+SeparatorsExtensions.swift b/Sources/Extensions/TableDirector/TableRow+SeparatorsExtensions.swift index 4108b165..d69ad3cf 100644 --- a/Sources/Extensions/TableDirector/TableRow+SeparatorsExtensions.swift +++ b/Sources/Extensions/TableDirector/TableRow+SeparatorsExtensions.swift @@ -22,11 +22,11 @@ import TableKit -fileprivate let configureSeparatorActionId = "TableRowConfigureSeparatorActionId" +private let configureSeparatorActionId = "TableRowConfigureSeparatorActionId" public extension TableRow where CellType: SeparatorCell { - func with(separatorType: CellSeparatorType) -> Self { + @discardableResult func set(separatorType: CellSeparatorType) -> Self { removeAction(forActionId: configureSeparatorActionId) let action = TableRowAction(.configure) { options in @@ -39,10 +39,6 @@ public extension TableRow where CellType: SeparatorCell { return self } - func set(separatorType: CellSeparatorType) { - _ = with(separatorType: separatorType) - } - } public extension TableRow where CellType: SeparatorCell {