From 7eb0d642371bf237751323d041e51e6a438b7476 Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Mon, 29 Apr 2024 19:26:49 -0400 Subject: [PATCH] Digital ACT191 story ONEAPP-7592 - Monarch testing --- MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift | 6 ++++-- MVMCoreUI/Atomic/Extensions/VDS-Enums+Codable.swift | 6 +++++- .../Headers/H1/HeadersH1NoButtonsBodyTextModel.swift | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift b/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift index 895bb027..649e5316 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift @@ -8,6 +8,7 @@ import Foundation import VDS +import MVMCore open class TileContainerModel: TileContainerBaseModel, ParentMoleculeModelProtocol, MoleculeModelProtocol { @@ -33,10 +34,11 @@ open class TileContainerModel: TileContainerBaseModel TitleLockupModel { guard let headline = headlineBody.headline else { throw ModelRegistry.Error.decoderOther(message: "headline is required for this use case.") } - var body = headlineBody.body + let body = headlineBody.body switch headlineBody.style ?? defaultStyle { case .landingHeader: headline.fontStyle = Styler.Font.RegularTitle2XLarge @@ -103,13 +103,13 @@ public struct DeprecatedHeadlineBodyHelper { headline.fontStyle = Styler.Font.RegularTitleXLarge body?.fontStyle = Styler.Font.RegularTitleMedium } - let model = try TitleLockupModel(title: headline, subTitle: body) + let model = TitleLockupModel(title: headline, subTitle: body) model.id = headlineBody.id return model } public func createHeadlineBodyModel(titleLockup: TitleLockupModel) -> HeadlineBodyModel { - var headlineBody = HeadlineBodyModel(headline: titleLockup.title) + let headlineBody = HeadlineBodyModel(headline: titleLockup.title) headlineBody.body = titleLockup.subTitle headlineBody.id = titleLockup.id return headlineBody