diff --git a/MVMCoreUI/Managers/SubNav/SubNavManagerController.swift b/MVMCoreUI/Managers/SubNav/SubNavManagerController.swift index c7f0f869..85e487ae 100644 --- a/MVMCoreUI/Managers/SubNav/SubNavManagerController.swift +++ b/MVMCoreUI/Managers/SubNav/SubNavManagerController.swift @@ -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) } }