Code review inspections fix

This commit is contained in:
Anton Popkov 2017-10-13 16:02:05 +03:00
parent 5c85bf2e5d
commit 06a208bb76
3 changed files with 6 additions and 12 deletions

View File

@ -37,7 +37,9 @@ public final class SeparatorRowBox {
/// - parameter row: TableRow which `cell` conforms to SeparatorCell
public init<T>(row: TableRow<T>) where T: SeparatorCell {
self.row = row
setSeparatorHandler = row.set
setSeparatorHandler = { separatorType in
row.set(separatorType: separatorType)
}
}
}

View File

@ -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<CellType>(.configure) { options in
@ -39,8 +39,4 @@ public extension TableRow where CellType: AppearanceProtocol {
return self
}
func set(appearance: CellType.Appearance) {
_ = with(appearance: appearance)
}
}

View File

@ -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<CellType>(.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 {