style push decode
This commit is contained in:
parent
9f574e854b
commit
c4c513250c
@ -83,9 +83,7 @@ open class TabBarModel: MoleculeModelProtocol {
|
|||||||
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedTab) {
|
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedTab) {
|
||||||
selectedTab = index
|
selectedTab = index
|
||||||
}
|
}
|
||||||
if let style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) {
|
style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style)
|
||||||
self.style = style
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open func encode(to encoder: Encoder) throws {
|
open func encode(to encoder: Encoder) throws {
|
||||||
|
|||||||
@ -89,9 +89,7 @@ open class TabsModel: MoleculeModelProtocol {
|
|||||||
_selectedColor = try typeContainer.decodeIfPresent(Color.self, forKey: .selectedColor)
|
_selectedColor = try typeContainer.decodeIfPresent(Color.self, forKey: .selectedColor)
|
||||||
_unselectedColor = try typeContainer.decodeIfPresent(Color.self, forKey: .unselectedColor)
|
_unselectedColor = try typeContainer.decodeIfPresent(Color.self, forKey: .unselectedColor)
|
||||||
_selectedBarColor = try typeContainer.decodeIfPresent(Color.self, forKey: .selectedBarColor)
|
_selectedBarColor = try typeContainer.decodeIfPresent(Color.self, forKey: .selectedBarColor)
|
||||||
if let style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) {
|
style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style)
|
||||||
self.style = style
|
|
||||||
}
|
|
||||||
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedIndex) {
|
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedIndex) {
|
||||||
selectedIndex = index
|
selectedIndex = index
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,9 +109,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
|||||||
additionalLeftButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalLeftButtons)
|
additionalLeftButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalLeftButtons)
|
||||||
additionalRightButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalRightButtons)
|
additionalRightButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalRightButtons)
|
||||||
titleView = try typeContainer.decodeModelIfPresent(codingKey: .titleView)
|
titleView = try typeContainer.decodeModelIfPresent(codingKey: .titleView)
|
||||||
if let style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) {
|
style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style)
|
||||||
self.style = style
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open func encode(to encoder: Encoder) throws {
|
open func encode(to encoder: Encoder) throws {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user