Code review inspections fix
This commit is contained in:
parent
5c85bf2e5d
commit
06a208bb76
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue