Merge branch 'feature/tabsListItem_action' into 'develop'
Tabslistitem molecule action See merge request BPHV_MIPS/mvm_core_ui!758
This commit is contained in:
commit
27a3c51f3c
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user