pointed to new property

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-12-11 14:20:06 -06:00
parent 49a385c12a
commit 7baa6d31a0

View File

@ -157,7 +157,7 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
/// Logs the action for the selected tab.
open func trackSelectTab() {
guard let action = tabs.tabsModel?.tabs[tabs.selectedIndex].action else { return }
guard let action = tabs.viewModel?.tabs[tabs.selectedIndex].action else { return }
MVMCoreUIActionHandler.shared()?.logAction(with: action.toJSON(), additionalData: getAdditionalDataForNewTabLoad(indexPath: IndexPath(row: tabs.selectedIndex, section: 0)), delegateObject: delegateObjectIVar)
}
@ -276,7 +276,7 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
Task(priority: .userInitiated) {
await NavigationHandler.shared().replace(viewController: controller, navigationController:subNavigationController, delegateObject:delegateObject(), tryToReplace: false, animated: true)
}
} else if let tabsModel = tabs.tabsModel,
} else if let tabsModel = tabs.viewModel,
let action = tabsModel.tabs[indexPath.row].action {
// Perform the tab action
MVMCoreUIActionHandler.performActionUnstructured(with: action, sourceModel: tabsModel, additionalData: getAdditionalDataForNewTabLoad(indexPath: indexPath), delegateObject: delegateObject())
@ -329,7 +329,7 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
// MARK: - MVMCoreUISwipeNavigationProtocol
public func swipeLeft() {
guard tabs.selectedIndex < (tabs.tabsModel?.tabs.count ?? 0) - 1 else { return }
guard tabs.selectedIndex < (tabs.viewModel?.tabs.count ?? 0) - 1 else { return }
_ = shouldSelectItem(IndexPath(row: tabs.selectedIndex + 1, section: 0), tabs: tabs)
}
@ -341,6 +341,6 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
public func update(percentage: CGFloat) {
guard customInteractor?.interactive == true,
let index = index else { return }
tabs.progress(from: tabs.selectedIndex, toIndex: index, percentage: percentage)
// tabs.progress(from: tabs.selectedIndex, toIndex: index, percentage: percentage)
}
}