removed un-needed properties
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c7d2dcd655
commit
efd98cc887
@ -22,11 +22,8 @@ import VDS
|
|||||||
public static override var identifier: String { "checkbox" }
|
public static override var identifier: String { "checkbox" }
|
||||||
public var selected: Bool = false
|
public var selected: Bool = false
|
||||||
public var animated: Bool = true
|
public var animated: Bool = true
|
||||||
public var inverted: Bool = false
|
|
||||||
public var action: ActionModelProtocol?
|
public var action: ActionModelProtocol?
|
||||||
public var offAction: ActionModelProtocol?
|
public var offAction: ActionModelProtocol?
|
||||||
|
|
||||||
public var surface: Surface { inverted ? .dark : .light }
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
@ -34,7 +31,6 @@ import VDS
|
|||||||
|
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
case checked
|
case checked
|
||||||
case inverted
|
|
||||||
case animated
|
case animated
|
||||||
case action
|
case action
|
||||||
case offAction
|
case offAction
|
||||||
@ -85,10 +81,6 @@ import VDS
|
|||||||
self.animated = animated
|
self.animated = animated
|
||||||
}
|
}
|
||||||
|
|
||||||
if let inverted = try typeContainer.decodeIfPresent(Bool.self, forKey: .inverted) {
|
|
||||||
self.inverted = inverted
|
|
||||||
}
|
|
||||||
|
|
||||||
action = try typeContainer.decodeModelIfPresent(codingKey: .action)
|
action = try typeContainer.decodeModelIfPresent(codingKey: .action)
|
||||||
offAction = try typeContainer.decodeModelIfPresent(codingKey: .offAction)
|
offAction = try typeContainer.decodeModelIfPresent(codingKey: .offAction)
|
||||||
|
|
||||||
@ -98,7 +90,6 @@ 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(selected, forKey: .checked)
|
try container.encode(selected, forKey: .checked)
|
||||||
try container.encode(inverted, forKey: .inverted)
|
|
||||||
try container.encodeIfPresent(animated, forKey: .animated)
|
try container.encodeIfPresent(animated, forKey: .animated)
|
||||||
try container.encodeModelIfPresent(action, forKey: .action)
|
try container.encodeModelIfPresent(action, forKey: .action)
|
||||||
try container.encodeModelIfPresent(offAction, forKey: .offAction)
|
try container.encodeModelIfPresent(offAction, forKey: .offAction)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user