passing sourcemodel

This commit is contained in:
Sankari, Swathi S 2021-09-03 21:08:49 +05:30
parent 9803c269a0
commit acbb26bbd8
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -68,7 +68,7 @@ extension TabsTableViewCell: TabsDelegate {
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 { if let action = model.tabs.tabs[index].action {
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: nil, delegateObject:delegateObject) MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: model], 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)
} }