Tabslistitem molecule action
This commit is contained in:
parent
ffb019f595
commit
9803c269a0
@ -244,7 +244,11 @@ extension Tabs: UICollectionViewDelegateFlowLayout {
|
|||||||
tabCell.setNeedsDisplay()
|
tabCell.setNeedsDisplay()
|
||||||
tabCell.setNeedsLayout()
|
tabCell.setNeedsLayout()
|
||||||
tabCell.layoutIfNeeded()
|
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: nil, delegateObject:delegateObject)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,9 @@ extension TabsTableViewCell: TabsDelegate {
|
|||||||
let index = indexPath.row
|
let index = indexPath.row
|
||||||
guard let model = tabsListItemModel,
|
guard let model = tabsListItemModel,
|
||||||
index < model.molecules.count else { return }
|
index < model.molecules.count else { return }
|
||||||
|
if let action = model.tabs.tabs[index].action {
|
||||||
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: nil, delegateObject:delegateObject)
|
||||||
|
}
|
||||||
MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user