Merge branch 'feature/swift_controllers' into feature/model_cleanup

This commit is contained in:
Pfeil, Scott Robert 2020-03-23 17:08:27 -04:00
commit d1e02ad570
3 changed files with 5 additions and 5 deletions

View File

@ -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)
}

View File

@ -153,7 +153,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 }
@ -183,7 +183,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() }) {

View File

@ -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