Fix check for public transport profile
This commit is contained in:
parent
09906af37e
commit
bff51cb5c2
4 changed files with 4 additions and 4 deletions
|
@ -567,7 +567,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
: ContextCompat.getColor(this, R.color.wikivoyage_active_light);
|
||||
|
||||
pb.setProgressDrawable(AndroidUtils.createProgressDrawable(bgColor, progressColor));
|
||||
pb.setIndeterminate(getRoutingHelper().getAppMode() == ApplicationMode.PUBLIC_TRANSPORT);
|
||||
pb.setIndeterminate(getRoutingHelper().isPublicTransportMode());
|
||||
pb.getIndeterminateDrawable().setColorFilter(progressColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
|
|
|
@ -950,7 +950,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
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.getAppMode() == ApplicationMode.PUBLIC_TRANSPORT;
|
||||
boolean publicTransportMode = helper.isPublicTransportMode();
|
||||
boolean routeCalculated = isRouteCalculated();
|
||||
int iconId = publicTransportMode ? R.drawable.ic_map : R.drawable.ic_action_start_navigation;
|
||||
int color1;
|
||||
|
|
|
@ -357,7 +357,7 @@ public class MapRouteInfoMenuFragment extends ContextMenuFragment {
|
|||
|
||||
private boolean isPublicTransportMode() {
|
||||
OsmandApplication app = getMyApplication();
|
||||
return app != null && app.getRoutingHelper().getAppMode() == ApplicationMode.PUBLIC_TRANSPORT;
|
||||
return app != null && app.getRoutingHelper().isPublicTransportMode();
|
||||
}
|
||||
|
||||
public void updateRouteCalculationProgress(int progress) {
|
||||
|
|
|
@ -1162,7 +1162,7 @@ public class RoutingHelper {
|
|||
}
|
||||
|
||||
public boolean isPublicTransportMode() {
|
||||
return mode == ApplicationMode.PUBLIC_TRANSPORT;
|
||||
return mode.isDerivedRoutingFrom(ApplicationMode.PUBLIC_TRANSPORT);
|
||||
}
|
||||
|
||||
public boolean isRouteBeingCalculated() {
|
||||
|
|
Loading…
Reference in a new issue