Fix #8883
This commit is contained in:
parent
75b8b0de3a
commit
b36c80d7ad
2 changed files with 8 additions and 1 deletions
|
@ -260,6 +260,8 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
|
|||
if (targetPointsHelper.getPointToStart() != null) {
|
||||
targetPointsHelper.clearStartPoint(true);
|
||||
app.getSettings().backupPointToStart();
|
||||
} else {
|
||||
targetPointsHelper.updateRouteAndRefresh(false);
|
||||
}
|
||||
}
|
||||
} else if (activity != null) {
|
||||
|
|
|
@ -1017,11 +1017,16 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
}
|
||||
final OsmandApplication app = mapActivity.getMyApplication();
|
||||
final RoutingHelper helper = app.getRoutingHelper();
|
||||
final TargetPointsHelper targetHelper = app.getTargetPointsHelper();
|
||||
|
||||
View startButton = mainView.findViewById(R.id.start_button);
|
||||
TextViewExProgress startButtonText = (TextViewExProgress) mainView.findViewById(R.id.start_button_descr);
|
||||
ProgressBar progressBar = (ProgressBar) mainView.findViewById(R.id.progress_bar_button);
|
||||
boolean publicTransportMode = helper.isPublicTransportMode();
|
||||
boolean routeCalculated = isRouteCalculated();
|
||||
boolean currentLocationNotFound = OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)
|
||||
&& targetHelper.getPointToStart() == null && targetHelper.getPointToNavigate() != null;
|
||||
|
||||
int iconId = publicTransportMode ? R.drawable.ic_map : R.drawable.ic_action_start_navigation;
|
||||
int color1;
|
||||
int color2;
|
||||
|
@ -1037,7 +1042,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
}
|
||||
} else {
|
||||
color1 = nightMode ? R.color.active_buttons_and_links_text_dark : R.color.active_buttons_and_links_text_light;
|
||||
if (routeCalculated) {
|
||||
if (routeCalculated || currentLocationNotFound && !helper.isRouteBeingCalculated()) {
|
||||
AndroidUtils.setBackground(app, startButton, nightMode, R.color.active_color_primary_light, R.color.active_color_primary_dark);
|
||||
color2 = color1;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue