Merge branch 'feature/3.0-TabBarModel' into 'feature/develop_mvp_3'

Setting default status to Tab bar model.

See merge request BPHV_MIPS/mvm_core_ui!828
This commit is contained in:
Pfeil, Scott Robert 2022-03-29 13:31:03 +00:00
commit a83f7a87b0

View File

@ -52,7 +52,7 @@ open class TabBarModel: MoleculeModelProtocol {
}
}
open var style: NavigationItemStyle?
open var style: NavigationItemStyle? = .dark
// Must be capped to 0...(tabs.count - 1)
open var selectedTab: Int = 0
@ -86,7 +86,9 @@ open class TabBarModel: MoleculeModelProtocol {
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedTab) {
selectedTab = index
}
style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style)
if let navStyle = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) {
style = navStyle
}
}
open func encode(to encoder: Encoder) throws {