From 4646fdf899a16c1d2bce1bf5355e763f52edf4b7 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Tue, 21 Feb 2023 23:01:44 +0100 Subject: [PATCH] [ios] Fixed unnecessary double click on route button Signed-off-by: Alexander Borsuk --- .../UI/BottomMenu/TabBar/BottomTabBarInteractor.swift | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift index f5ad80ae16..4b24479d8d 100644 --- a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift +++ b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarInteractor.swift @@ -13,8 +13,6 @@ class BottomTabBarInteractor { private weak var controlsManager: MWMMapViewControlsManager? private weak var searchManager = MWMSearchManager.manager() - private var isPoint2PointSelected = false - init(viewController: UIViewController, mapViewController: MapViewController, controlsManager: MWMMapViewControlsManager) { self.viewController = viewController self.mapViewController = mapViewController @@ -32,13 +30,10 @@ extension BottomTabBarInteractor: BottomTabBarInteractorProtocol { } func openPoint2Point() { - isPoint2PointSelected.toggle() MWMRouter.enableAutoAddLastLocation(false) - if (isPoint2PointSelected) { - controlsManager?.onRoutePrepare() - } else { - MWMRouter.stopRouting() - } + // Is stopRouting really needed here? + MWMRouter.stopRouting() + controlsManager?.onRoutePrepare() } func openHelp() {