Setting default status to Tab bar model.
This commit is contained in:
parent
cd87a78072
commit
71a9b139d3
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user