review comment updated
This commit is contained in:
parent
3057226a75
commit
adc15bd6d8
@ -205,7 +205,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
|
|
||||||
//Check header and footer if replace happens then return.
|
//Check header and footer if replace happens then return.
|
||||||
if updateMoleculeViewById(topView, with: molecule) ||
|
if updateMoleculeViewById(topView, with: molecule) ||
|
||||||
updateMoleculeViewById(bottomView, with: molecule) {
|
updateMoleculeViewById(bottomView, with: molecule, isHeader: false) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,10 +229,12 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
}
|
}
|
||||||
|
|
||||||
///Helper functions to update view with molecule
|
///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,
|
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 }) {
|
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)
|
updateMoleculeView(moleculeView, from: molecule)
|
||||||
|
//Redraw the header and footer for content update
|
||||||
|
isHeader ? showHeader(nil) : showFooter(nil)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user