style push decode

This commit is contained in:
Scott Pfeil 2022-03-09 12:21:25 -05:00
parent 9f574e854b
commit c4c513250c
3 changed files with 3 additions and 9 deletions

View File

@ -83,9 +83,7 @@ open class TabBarModel: MoleculeModelProtocol {
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedTab) {
selectedTab = index
}
if let style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) {
self.style = style
}
style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style)
}
open func encode(to encoder: Encoder) throws {

View File

@ -89,9 +89,7 @@ open class TabsModel: MoleculeModelProtocol {
_selectedColor = try typeContainer.decodeIfPresent(Color.self, forKey: .selectedColor)
_unselectedColor = try typeContainer.decodeIfPresent(Color.self, forKey: .unselectedColor)
_selectedBarColor = try typeContainer.decodeIfPresent(Color.self, forKey: .selectedBarColor)
if let style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) {
self.style = style
}
style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style)
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedIndex) {
selectedIndex = index
}

View File

@ -109,9 +109,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
additionalLeftButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalLeftButtons)
additionalRightButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalRightButtons)
titleView = try typeContainer.decodeModelIfPresent(codingKey: .titleView)
if let style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) {
self.style = style
}
style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style)
}
open func encode(to encoder: Encoder) throws {