From e07eaca2dbe9056b3d6434fa9ce6d3c7a8772bd5 Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Thu, 5 Oct 2023 16:26:49 +0400 Subject: [PATCH] [ios] fix: remove point-to-point button and associated code from bottom tabbar Signed-off-by: Kiryl Kaveryn --- .../TabBar/BottomTabBarInteractor.swift | 8 ---- .../TabBar/BottomTabBarPresenter.swift | 5 --- .../TabBar/BottomTabBarViewController.swift | 7 +--- .../TabBar/BottomTabBarViewController.xib | 41 ++++++------------- 4 files changed, 13 insertions(+), 48 deletions(-) diff --git a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift index 4b24479d8d..82913b477c 100644 --- a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift +++ b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift @@ -1,6 +1,5 @@ protocol BottomTabBarInteractorProtocol: AnyObject { func openSearch() - func openPoint2Point() func openHelp() func openBookmarks() func openMenu() @@ -28,13 +27,6 @@ extension BottomTabBarInteractor: BottomTabBarInteractorProtocol { searchManager?.state = .hidden } } - - func openPoint2Point() { - MWMRouter.enableAutoAddLastLocation(false) - // Is stopRouting really needed here? - MWMRouter.stopRouting() - controlsManager?.onRoutePrepare() - } func openHelp() { MapViewController.shared()?.navigationController?.pushViewController(AboutController(), animated: true) diff --git a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarPresenter.swift b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarPresenter.swift index 8853bf6b90..de11abfc46 100644 --- a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarPresenter.swift +++ b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarPresenter.swift @@ -1,7 +1,6 @@ protocol BottomTabBarPresenterProtocol: AnyObject { func configure() func onSearchButtonPressed() - func onPoint2PointButtonPressed() func onHelpButtonPressed() func onBookmarksButtonPressed() func onMenuButtonPressed() @@ -23,10 +22,6 @@ extension BottomTabBarPresenter: BottomTabBarPresenterProtocol { interactor.openSearch() } - func onPoint2PointButtonPressed() { - interactor.openPoint2Point() - } - func onHelpButtonPressed() { interactor.openHelp() } diff --git a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift index 28b020084d..a280fbaf87 100644 --- a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift +++ b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift @@ -2,7 +2,6 @@ class BottomTabBarViewController: UIViewController { var presenter: BottomTabBarPresenterProtocol! @IBOutlet var searchButton: MWMButton! - @IBOutlet var routeButton: MWMButton! @IBOutlet var helpButton: MWMButton! @IBOutlet var bookmarksButton: MWMButton! @IBOutlet var moreButton: MWMButton! @@ -57,11 +56,7 @@ class BottomTabBarViewController: UIViewController { @IBAction func onSearchButtonPressed(_ sender: Any) { presenter.onSearchButtonPressed() } - - @IBAction func onPoint2PointButtonPressed(_ sender: Any) { - presenter.onPoint2PointButtonPressed() - } - + @IBAction func onHelpButtonPressed(_ sender: Any) { presenter.onHelpButtonPressed() } diff --git a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.xib b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.xib index bba0e936c0..0c4a7ce402 100644 --- a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.xib +++ b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.xib @@ -1,9 +1,9 @@ - + - + @@ -14,7 +14,6 @@ - @@ -28,7 +27,7 @@ - - + @@ -97,29 +85,25 @@ - - - + - - + - + + - - + - @@ -143,7 +127,6 @@ -