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 var selected: Bool = false
|
||||
public var animated: Bool = true
|
||||
public var inverted: Bool = false
|
||||
public var action: ActionModelProtocol?
|
||||
public var offAction: ActionModelProtocol?
|
||||
|
||||
public var surface: Surface { inverted ? .dark : .light }
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
@ -34,7 +31,6 @@ import VDS
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case checked
|
||||
case inverted
|
||||
case animated
|
||||
case action
|
||||
case offAction
|
||||
@ -85,10 +81,6 @@ import VDS
|
||||
self.animated = animated
|
||||
}
|
||||
|
||||
if let inverted = try typeContainer.decodeIfPresent(Bool.self, forKey: .inverted) {
|
||||
self.inverted = inverted
|
||||
}
|
||||
|
||||
action = try typeContainer.decodeModelIfPresent(codingKey: .action)
|
||||
offAction = try typeContainer.decodeModelIfPresent(codingKey: .offAction)
|
||||
|
||||
@ -98,7 +90,6 @@ import VDS
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(selected, forKey: .checked)
|
||||
try container.encode(inverted, forKey: .inverted)
|
||||
try container.encodeIfPresent(animated, forKey: .animated)
|
||||
try container.encodeModelIfPresent(action, forKey: .action)
|
||||
try container.encodeModelIfPresent(offAction, forKey: .offAction)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user