Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui into bugfix/scripts

This commit is contained in:
Scott Pfeil 2021-09-07 13:34:34 -04:00
commit 9c87c8c31b
2 changed files with 8 additions and 1 deletions

View File

@ -244,7 +244,11 @@ extension Tabs: UICollectionViewDelegateFlowLayout {
tabCell.setNeedsDisplay()
tabCell.setNeedsLayout()
tabCell.layoutIfNeeded()
delegate?.didSelectItem(indexPath, tabs: self)
if let delegate = delegate {
delegate.didSelectItem(indexPath, tabs: self)
} else if let action = tabsModel.tabs[selectedIndex].action {
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: tabsModel], delegateObject:delegateObject)
}
}
}

View File

@ -67,6 +67,9 @@ extension TabsTableViewCell: TabsDelegate {
let index = indexPath.row
guard let model = tabsListItemModel,
index < model.molecules.count else { return }
if let action = model.tabs.tabs[index].action {
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: model.tabs], delegateObject:delegateObject)
}
MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
}
}