From e309c589d0267239ef40d734175eeccb2d5a4d06 Mon Sep 17 00:00:00 2001 From: "Khan, Arshad" Date: Wed, 29 Apr 2020 20:33:55 +0530 Subject: [PATCH] Implemented Scott feedback --- MVMCoreUI/Atomic/Atoms/Views/Line.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Line.swift b/MVMCoreUI/Atomic/Atoms/Views/Line.swift index 92800e52..c22aa11c 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Line.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Line.swift @@ -30,16 +30,16 @@ import UIKit switch style { case .standard: updateLineConstraints(constant: 1) - backgroundColor = .mfSilver() + backgroundColor = lineModel?.backgroundColor?.uiColor ?? .mfSilver() case .thin: updateLineConstraints(constant: 1) - backgroundColor = .black + backgroundColor = lineModel?.backgroundColor?.uiColor ?? .black case .medium: updateLineConstraints(constant: 2) - backgroundColor = .black + backgroundColor = lineModel?.backgroundColor?.uiColor ?? .black case .heavy: updateLineConstraints(constant: 4) - backgroundColor = .black + backgroundColor = lineModel?.backgroundColor?.uiColor ?? .black case .none: updateLineConstraints(constant: 0) } @@ -69,11 +69,11 @@ import UIKit // MARK: - MoleculeViewProtocol open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { + super.set(with: model, delegateObject, additionalData) if let lineModel = model as? LineModel { self.lineModel = lineModel setStyle(lineModel.type) } - super.set(with: model, delegateObject, additionalData) } open override func reset() {