diff --git a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift index 63d592ce..81c2d673 100644 --- a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift +++ b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift @@ -140,7 +140,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol } } - public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + open func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return (getMoleculeInfo(for: indexPath)?.molecule as? ListItemModelProtocol)?.gone == true ? 0 : UITableView.automaticDimension } @@ -289,7 +289,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol /// Returns the (identifier, class) of the molecule for the indexPath. func getMoleculeInfo(for indexPath: IndexPath) -> MoleculeInfo? { - moleculesInfo?[indexPath.row] + moleculesInfo?[safe: indexPath.row] } /// Sets up the molecule list and ensures no errors loading all content.