From ca39be5643dfee4331c417ac7f5a7d8d66af519e Mon Sep 17 00:00:00 2001 From: Subhankar Acharya Date: Thu, 13 Feb 2020 19:41:11 +0530 Subject: [PATCH] Code Fixes after comments. --- .../List/RightVariable/ListRightVariablePayments.swift | 2 +- .../List/RightVariable/ListRightVariablePaymentsModel.swift | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift index 34928e24..626e8d42 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift @@ -14,7 +14,7 @@ import Foundation // MARK: - Outlets //------------------------------------------------------- - let leftLabel = Label.commonLabelB2(true) + let leftLabel = Label.commonLabelB1(true) let rightImage = MFLoadImageView(pinnedEdges: .all) let stack = Stack(frame: .zero) diff --git a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift index 3478cda1..97f8e1d2 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift @@ -40,6 +40,7 @@ public class ListRightVariablePaymentsModel: ContainerModel, ListItemModelProtoc case leftLabel case image case action + case backgroundColor } required public init(from decoder: Decoder) throws { @@ -47,6 +48,7 @@ public class ListRightVariablePaymentsModel: ContainerModel, ListItemModelProtoc leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel) image = try typeContainer.decode(ImageViewModel.self, forKey: .image) action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) + backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) try super.init(from: decoder) setDefaults() } @@ -58,5 +60,7 @@ public class ListRightVariablePaymentsModel: ContainerModel, ListItemModelProtoc try container.encode(leftLabel, forKey: .leftLabel) try container.encode(image, forKey: .image) try container.encodeModelIfPresent(action, forKey: .action) + try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor) + } }