From d879b8c71f4bde21db47c45bfd682f5c8e5382bd Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 10 May 2022 14:50:27 -0500 Subject: [PATCH] refactored create(with: Signed-off-by: Matt Bruce --- MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift | 2 +- MVMCoreUI/TopAlert/TopNotificationModel.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift b/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift index 0df77ff1..082f2da3 100644 --- a/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift +++ b/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift @@ -33,7 +33,7 @@ public extension TemplateProtocol { guard let pageJSON = json else { return } let delegateObject = (self as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject let data = try JSONSerialization.data(withJSONObject: pageJSON) - let decoder = JSONDecoder.create(delegateObject: delegateObject) + let decoder = JSONDecoder.create(with: delegateObject) templateModel = try decodeTemplate(using: decoder, from: data) // Add additional required behaviors if applicable. diff --git a/MVMCoreUI/TopAlert/TopNotificationModel.swift b/MVMCoreUI/TopAlert/TopNotificationModel.swift index 8e885e22..75300a3f 100644 --- a/MVMCoreUI/TopAlert/TopNotificationModel.swift +++ b/MVMCoreUI/TopAlert/TopNotificationModel.swift @@ -69,7 +69,7 @@ open class TopNotificationModel: Codable { /// Decodes the top alert json to a model. public static func decode(json: [AnyHashable: Any], delegateObject: MVMCoreUIDelegateObject?) throws -> Self { let data = try JSONSerialization.data(withJSONObject: json) - let decoder = JSONDecoder.create(delegateObject: delegateObject) + let decoder = JSONDecoder.create(with: delegateObject) return try decoder.decode(self, from: data) }