From 59f66ca3b33d4f1a7b201134db490fb55c18fb3a Mon Sep 17 00:00:00 2001 From: Roman Romanov Date: Wed, 5 Jul 2017 15:09:13 +0400 Subject: [PATCH] [android] don't show start routing button if has error or routing is not built --- android/src/com/mapswithme/maps/MwmActivity.java | 6 ------ .../maps/routing/RoutingBottomMenuController.java | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index 8687880ce7..0b87fe6fd6 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -1737,12 +1737,6 @@ public class MwmActivity extends BaseMwmFragmentActivity private void showLineFrame(boolean show, @Nullable Runnable completion) { mMainMenu.showLineFrame(show, completion); - if (mIsFragmentContainer) - { - RoutingPlanFragment fragment = (RoutingPlanFragment) getFragment(RoutingPlanFragment.class); - if (fragment != null) - fragment.showStartButton(show); - } } private void setNavButtonsTopLimit(int limit) diff --git a/android/src/com/mapswithme/maps/routing/RoutingBottomMenuController.java b/android/src/com/mapswithme/maps/routing/RoutingBottomMenuController.java index 9cc3418709..2963a666d0 100644 --- a/android/src/com/mapswithme/maps/routing/RoutingBottomMenuController.java +++ b/android/src/com/mapswithme/maps/routing/RoutingBottomMenuController.java @@ -280,7 +280,9 @@ final class RoutingBottomMenuController implements View.OnClickListener void showStartButton(boolean show) { - UiUtils.showIf(show, mStart); + boolean result = show && (RoutingController.get().isBuilt() + || RoutingController.get().isTaxiRouterType()); + UiUtils.showIf(result, mStart); } void saveRoutingPanelState(@NonNull Bundle outState)