Add check for routeCalculationInProgress before opening menu to half screen

This commit is contained in:
Chumva 2019-03-20 16:57:39 +02:00
parent acccb045c9
commit be06fd3a6b

View file

@ -406,15 +406,15 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
if (app != null && fragmentRef != null && fragment.isVisible()) { if (app != null && fragmentRef != null && fragment.isVisible()) {
boolean routeCalculating = app.getRoutingHelper().isRouteBeingCalculated() || app.getTransportRoutingHelper().isRouteBeingCalculated(); boolean routeCalculating = app.getRoutingHelper().isRouteBeingCalculated() || app.getTransportRoutingHelper().isRouteBeingCalculated();
if (setRouteCalculationInProgress(routeCalculating)) { if (setRouteCalculationInProgress(routeCalculating)) {
if (!routeCalculationInProgress) {
fragment.hideRouteCalculationProgressBar();
}
fragment.updateControlButtons(); fragment.updateControlButtons();
fragment.updateInfo(); fragment.updateInfo();
if (!routeCalculationInProgress) {
fragment.hideRouteCalculationProgressBar();
fragment.openMenuHalfScreen(); fragment.openMenuHalfScreen();
} }
} }
} }
}
public void openMenuFullScreen() { public void openMenuFullScreen() {
WeakReference<MapRouteInfoMenuFragment> fragmentRef = findMenuFragment(); WeakReference<MapRouteInfoMenuFragment> fragmentRef = findMenuFragment();
@ -705,6 +705,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
routingHelper.setAppMode(next); routingHelper.setAppMode(next);
app.initVoiceCommandPlayer(mapActivity, next, true, null, false, false); app.initVoiceCommandPlayer(mapActivity, next, true, null, false, false);
routingHelper.recalculateRouteDueToSettingsChange(); routingHelper.recalculateRouteDueToSettingsChange();
updateMenu();
} }
} }