From adc15bd6d8423d262c5e82366f1584f50d52ab40 Mon Sep 17 00:00:00 2001 From: vimal Date: Thu, 15 Feb 2024 19:30:15 +0530 Subject: [PATCH] review comment updated --- MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift index b72cfd57..8f06ca7f 100644 --- a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift +++ b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift @@ -205,7 +205,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol //Check header and footer if replace happens then return. if updateMoleculeViewById(topView, with: molecule) || - updateMoleculeViewById(bottomView, with: molecule) { + updateMoleculeViewById(bottomView, with: molecule, isHeader: false) { return } @@ -229,10 +229,12 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol } ///Helper functions to update view with molecule - private func updateMoleculeViewById(_ view: UIView?, with molecule: MoleculeModelProtocol) -> Bool { + private func updateMoleculeViewById(_ view: UIView?, with molecule: MoleculeModelProtocol, isHeader: Bool = true) -> Bool { if let updateView = view, let moleculeView = MVMCoreUIUtility.findViews(by: MoleculeViewProtocol.self, views: [updateView]).first(where: { $0.model?.moleculeName == molecule.moleculeName && $0.model?.id == molecule.id }) { updateMoleculeView(moleculeView, from: molecule) + //Redraw the header and footer for content update + isHeader ? showHeader(nil) : showFooter(nil) return true } return false