Merge branch 'bugfix/navigation_label_button' into 'develop'
moleculeName for encode See merge request BPHV_MIPS/mvm_core_ui!535
This commit is contained in:
commit
c668d27fbb
@ -22,6 +22,7 @@ public class NavigationImageButtonModel: NavigationButtonModelProtocol, Molecule
|
|||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
case image
|
case image
|
||||||
case action
|
case action
|
||||||
|
case moleculeName
|
||||||
}
|
}
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
@ -33,6 +34,7 @@ public class NavigationImageButtonModel: NavigationButtonModelProtocol, Molecule
|
|||||||
open func encode(to encoder: Encoder) throws {
|
open func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encode(image, forKey: .image)
|
try container.encode(image, forKey: .image)
|
||||||
|
try container.encode(moleculeName, forKey: .moleculeName)
|
||||||
try container.encodeModel(action, forKey: .action)
|
try container.encodeModel(action, forKey: .action)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@ public class NavigationLabelButtonModel: NavigationButtonModelProtocol, Molecule
|
|||||||
}
|
}
|
||||||
|
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case moleculeName
|
||||||
case title
|
case title
|
||||||
case action
|
case action
|
||||||
}
|
}
|
||||||
@ -33,6 +34,7 @@ public class NavigationLabelButtonModel: NavigationButtonModelProtocol, Molecule
|
|||||||
|
|
||||||
open func encode(to encoder: Encoder) throws {
|
open func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
try container.encode(moleculeName, forKey: .moleculeName)
|
||||||
try container.encode(title, forKey: .title)
|
try container.encode(title, forKey: .title)
|
||||||
try container.encodeModel(action, forKey: .action)
|
try container.encodeModel(action, forKey: .action)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user