enhancement on the header update based on the molecules

This commit is contained in:
vimal 2024-01-03 15:23:29 +05:30
parent c91d389ea5
commit 047d9b7014

View File

@ -202,7 +202,21 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
}
open func newData(for molecule: MoleculeModelProtocol) {
//TODO: expand for header, navigation, etc
if let headerMolecule = molecule as? MoleculeHeaderModel {
//If complete header replaced then it makes sense to add this
/*createViewForTableHeader()
let width = view.bounds.width
if let topView = topView as? MVMCoreViewProtocol {
topView.updateView(width)
showHeader(width)
}*/
//Just update is happening only on the existing molecules. ex. changing the title, action etc..
(topView as? MoleculeViewProtocol)?.set(with: headerMolecule, delegateObject() as? MVMCoreUIDelegateObject, nil)
return
}
//TODO: expand for navigation, etc
guard let moleculesInfo = moleculesInfo else { return }
let indicies = moleculesInfo.indices.filter({ index -> Bool in