updates for polling

This commit is contained in:
Pfeil, Scott Robert 2020-10-15 10:37:36 -04:00
parent 87904151b1
commit 159798f0d8
2 changed files with 8 additions and 8 deletions

View File

@ -8,7 +8,7 @@
import Foundation
public class CollapsableNotificationModel: NotificationModel {
open class CollapsableNotificationModel: NotificationModel {
public class override var identifier: String {
return "collapsableNotification"
}
@ -19,12 +19,12 @@ public class CollapsableNotificationModel: NotificationModel {
public var initiallyCollapsed = false
public var pages: [String]?
init(with topLabel: LabelModel, headline: LabelModel) {
public init(with topLabel: LabelModel, headline: LabelModel) {
self.topLabel = topLabel
super.init(with: headline)
}
override func setDefault() {
open override func setDefault() {
super.setDefault()
if topLabel.textColor == nil {
topLabel.textColor = Color(uiColor: .white)
@ -61,7 +61,7 @@ public class CollapsableNotificationModel: NotificationModel {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
open override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName)

View File

@ -8,7 +8,7 @@
import Foundation
public class NotificationModel: MoleculeModelProtocol {
open class NotificationModel: MoleculeModelProtocol {
public class var identifier: String {
return "notification"
}
@ -18,11 +18,11 @@ public class NotificationModel: MoleculeModelProtocol {
public var button: ButtonModel?
public var closeButton: NotificationXButtonModel?
init(with headline: LabelModel) {
public init(with headline: LabelModel) {
self.headline = headline
}
func setDefault() {
open func setDefault() {
if backgroundColor == nil {
backgroundColor = Color(uiColor: .mvmGreen())
}
@ -59,7 +59,7 @@ public class NotificationModel: MoleculeModelProtocol {
setDefault()
}
public func encode(to encoder: Encoder) throws {
open 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)