remvoed inverted since this is now in subclass
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
8a89b2b2a9
commit
192509feef
@ -16,8 +16,6 @@ import VDS
|
|||||||
public override static var identifier: String { "radioBoxes" }
|
public override static var identifier: String { "radioBoxes" }
|
||||||
|
|
||||||
public var boxes: [RadioBoxModel]
|
public var boxes: [RadioBoxModel]
|
||||||
public var inverted: Bool = false
|
|
||||||
public var surface: Surface { inverted ? .dark : .light }
|
|
||||||
|
|
||||||
public var selectorModels: [VDS.RadioBoxGroup.RadioBoxItemModel] {
|
public var selectorModels: [VDS.RadioBoxGroup.RadioBoxItemModel] {
|
||||||
boxes.compactMap({ item in
|
boxes.compactMap({ item in
|
||||||
@ -58,7 +56,6 @@ import VDS
|
|||||||
|
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
case boxes
|
case boxes
|
||||||
case inverted
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -77,9 +74,6 @@ import VDS
|
|||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
boxes = try typeContainer.decode([RadioBoxModel].self, forKey: .boxes)
|
boxes = try typeContainer.decode([RadioBoxModel].self, forKey: .boxes)
|
||||||
if let inverted = try typeContainer.decodeIfPresent(Bool.self, forKey: .inverted) {
|
|
||||||
self.inverted = inverted
|
|
||||||
}
|
|
||||||
try super.init(from: decoder)
|
try super.init(from: decoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +81,5 @@ import VDS
|
|||||||
try super.encode(to: encoder)
|
try super.encode(to: encoder)
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encode(boxes, forKey: .boxes)
|
try container.encode(boxes, forKey: .boxes)
|
||||||
try container.encode(inverted, forKey: .inverted)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user