f
This commit is contained in:
parent
65cd734a40
commit
60ab87764b
@ -60,11 +60,6 @@ open class ArrowModel: MoleculeModelProtocol {
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
|
||||
// if let state = try typeContainer.decodeIfPresent(Bool.self, forKey: .state) {
|
||||
// self.state = state
|
||||
// }
|
||||
// action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType)
|
||||
// alternateAction = try typeContainer.decodeModelIfPresent(codingKey: .alternateAction, typeCodingKey: ActionCodingKey.actionType)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
disabledColor = try typeContainer.decodeIfPresent(Color.self, forKey: .disabledColor)
|
||||
enabledColor = try typeContainer.decodeIfPresent(Color.self, forKey: .enabledColor)
|
||||
|
||||
@ -150,7 +150,7 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
|
||||
public override func updateUI(previousIndex: Int, newIndex: Int, totalCount: Int, isAnimated: Bool) {
|
||||
|
||||
guard !barReferences.isEmpty else {
|
||||
guard !barReferences.isEmpty || totalCount != barReferences.count else {
|
||||
generateBars()
|
||||
return
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelPro
|
||||
//--------------------------------------------------
|
||||
|
||||
public class var identifier: String {
|
||||
return "barsCarouselIndicator"
|
||||
return ""
|
||||
}
|
||||
|
||||
public var backgroundColor: Color?
|
||||
|
||||
@ -93,14 +93,14 @@ import UIKit
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeIfPresent(molecules, forKey: .molecules)
|
||||
try container.encodeIfPresent(spacing, forKey: .spacing)
|
||||
try container.encodeIfPresent(border, forKey: .border)
|
||||
try container.encodeIfPresent(loop, forKey: .loop)
|
||||
try container.encodeIfPresent(height, forKey: .height)
|
||||
try container.encodeIfPresent(itemWidthPercent, forKey: .itemWidthPercent)
|
||||
try container.encodeIfPresent(itemAlignment, forKey: .itemAlignment)
|
||||
try container.encode(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encode(molecules, forKey: .molecules)
|
||||
try container.encode(spacing, forKey: .spacing)
|
||||
try container.encode(border, forKey: .border)
|
||||
try container.encode(loop, forKey: .loop)
|
||||
try container.encode(height, forKey: .height)
|
||||
try container.encode(itemWidthPercent, forKey: .itemWidthPercent)
|
||||
try container.encode(itemAlignment, forKey: .itemAlignment)
|
||||
try container.encodeModelIfPresent(pagingMolecule, forKey: .pagingMolecule)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user