Merge branch 'feature/coding' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui into feature/coding
This commit is contained in:
commit
7790a20ad3
@ -15,7 +15,7 @@ import MVMCore
|
|||||||
public var action: ActionProtocol?
|
public var action: ActionProtocol?
|
||||||
public var hideArrow: Bool?
|
public var hideArrow: Bool?
|
||||||
public var line: LineModel?
|
public var line: LineModel?
|
||||||
public var style: String?
|
public var style: String? = "standard"
|
||||||
|
|
||||||
enum ListItemCodingKeys: String, CodingKey {
|
enum ListItemCodingKeys: String, CodingKey {
|
||||||
case backgroundColor
|
case backgroundColor
|
||||||
@ -31,8 +31,18 @@ import MVMCore
|
|||||||
action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType)
|
action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType)
|
||||||
hideArrow = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideArrow)
|
hideArrow = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideArrow)
|
||||||
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
|
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
|
||||||
style = try typeContainer.decodeIfPresent(String.self, forKey: .style)
|
if let style = try typeContainer.decodeIfPresent(String.self, forKey: .style) {
|
||||||
|
self.style = style
|
||||||
|
}
|
||||||
|
|
||||||
try super.init(from: decoder)
|
try super.init(from: decoder)
|
||||||
|
|
||||||
|
if useHorizontalMargins == nil {
|
||||||
|
useHorizontalMargins = true
|
||||||
|
}
|
||||||
|
if useVerticalMargins == nil {
|
||||||
|
useVerticalMargins = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func encode(to encoder: Encoder) throws {
|
public override func encode(to encoder: Encoder) throws {
|
||||||
@ -45,3 +55,4 @@ import MVMCore
|
|||||||
try container.encodeIfPresent(style, forKey: .style)
|
try container.encodeIfPresent(style, forKey: .style)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user