cleanup
This commit is contained in:
parent
8860ced85e
commit
fec64291ee
@ -62,6 +62,8 @@ open class ThreeLayerViewController: ProgrammaticScrollViewController {
|
||||
}
|
||||
|
||||
open override func handleNewData() {
|
||||
super.handleNewData()
|
||||
|
||||
// Removes the views
|
||||
topView?.removeFromSuperview()
|
||||
middleView?.removeFromSuperview()
|
||||
@ -78,8 +80,6 @@ open class ThreeLayerViewController: ProgrammaticScrollViewController {
|
||||
heightConstraint?.isActive = false
|
||||
|
||||
setupLayers()
|
||||
|
||||
super.handleNewData()
|
||||
}
|
||||
|
||||
//MARK:-Functions to subclass
|
||||
|
||||
@ -14,7 +14,7 @@ open class ModalMoleculeListTemplate: MoleculeListTemplate {
|
||||
|
||||
override open func handleNewData() {
|
||||
super.handleNewData()
|
||||
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { [weak self] _ in
|
||||
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { _ in
|
||||
MVMCoreNavigationHandler.shared()?.removeCurrentViewController()
|
||||
}, verticalCentered: false)
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
||||
|
||||
open override func getIndexPath(for molecule: ListItemModelProtocol & MoleculeModelProtocol) -> IndexPath? {
|
||||
guard let index = moleculesInfo?.firstIndex(where: { (moleculeInfo) -> Bool in
|
||||
//TODO: check for molecule protocola eqaulity
|
||||
//TODO: check for molecule protocol eqaulity
|
||||
let json = moleculeInfo.molecule.toJSON()
|
||||
return json == molecule.toJSON()
|
||||
}) else { return nil }
|
||||
@ -192,7 +192,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
||||
|
||||
open override func removeMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], animation: UITableView.RowAnimation) {
|
||||
var indexPaths: [IndexPath] = []
|
||||
//TODO: check for molecule protocola equality
|
||||
//TODO: check for molecule protocol equality
|
||||
|
||||
for molecule in molecules {
|
||||
if let removeIndex = moleculesInfo?.firstIndex(where: { molecule.toJSON() == $0.molecule.toJSON() }) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user