diff --git a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift index 09860232..15db1009 100644 --- a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift +++ b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift @@ -18,7 +18,7 @@ public class CollapsableNotificationModel: MoleculeModelProtocol { public var body: LabelModel? public var button: ButtonModel? public var closeButton: NotificationXButtonModel? - public var alwaysShowCollapsedLabel = false + public var alwaysShowTopLabel = false public var collapseTime: Int = 5 public var initiallyCollapsed = false public var pages: [String]? @@ -37,7 +37,7 @@ public class CollapsableNotificationModel: MoleculeModelProtocol { case body case button case closeButton - case alwaysShowCollapsedLabel + case alwaysShowTopLabel case collapseTime case initiallyCollapsed case pages @@ -52,8 +52,8 @@ public class CollapsableNotificationModel: MoleculeModelProtocol { body = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .body) button = try typeContainer.decodeIfPresent(ButtonModel.self, forKey: .button) closeButton = try typeContainer.decodeIfPresent(NotificationXButtonModel.self, forKey: .closeButton) - if let alwaysShowCollapsedLabel = try typeContainer.decodeIfPresent(Bool.self, forKey: .alwaysShowCollapsedLabel) { - self.alwaysShowCollapsedLabel = alwaysShowCollapsedLabel + if let alwaysShowTopLabel = try typeContainer.decodeIfPresent(Bool.self, forKey: .alwaysShowTopLabel) { + self.alwaysShowTopLabel = alwaysShowTopLabel } if let collapseTime = try typeContainer.decodeIfPresent(Int.self, forKey: .collapseTime) { self.collapseTime = collapseTime @@ -74,7 +74,7 @@ public class CollapsableNotificationModel: MoleculeModelProtocol { try container.encodeIfPresent(body, forKey: .body) try container.encodeIfPresent(button, forKey: .button) try container.encodeIfPresent(closeButton, forKey: .closeButton) - try container.encode(alwaysShowCollapsedLabel, forKey: .alwaysShowCollapsedLabel) + try container.encode(alwaysShowTopLabel, forKey: .alwaysShowTopLabel) try container.encode(collapseTime, forKey: .collapseTime) try container.encode(initiallyCollapsed, forKey: .initiallyCollapsed) try container.encodeIfPresent(pages, forKey: .pages) diff --git a/MVMCoreUI/Atomic/Molecules/TopNotification/MVMCoreUITopAlertExpandableView+Extension.swift b/MVMCoreUI/Atomic/Molecules/TopNotification/MVMCoreUITopAlertExpandableView+Extension.swift index 793edf97..e28bf057 100644 --- a/MVMCoreUI/Atomic/Molecules/TopNotification/MVMCoreUITopAlertExpandableView+Extension.swift +++ b/MVMCoreUI/Atomic/Molecules/TopNotification/MVMCoreUITopAlertExpandableView+Extension.swift @@ -15,7 +15,7 @@ extension MVMCoreUITopAlertExpandableView: MoleculeViewProtocol { guard let model = model as? CollapsableNotificationModel else { return } backgroundColor = model.backgroundColor?.uiColor ?? .mvmGreen collapseTime = model.collapseTime - onlyShowTopMessageWhenCollapsed = !model.alwaysShowCollapsedLabel + onlyShowTopMessageWhenCollapsed = !model.alwaysShowTopLabel var actionMap = model.button?.action.toJSON() if let title = model.button?.title {