[android] don't show start routing button if has error or routing is not built

This commit is contained in:
Roman Romanov 2017-07-05 15:09:13 +04:00 committed by r.kuznetsov
parent c7242b46ec
commit 59f66ca3b3
2 changed files with 3 additions and 7 deletions

View file

@ -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)

View file

@ -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)