Merge pull request #7098 from osmandapp/profile_fixes_3

Fixed: Show straightline and brouter as navigation types
This commit is contained in:
vshcherb 2019-06-25 16:29:38 +02:00 committed by GitHub
commit 325c4a9742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,9 +215,13 @@ public class EditProfileFragment extends BaseOsmAndFragment {
typeSelectionBtn.setClickable(false);
}
if (!Algorithms.isEmpty(mode.getRoutingProfile())) {
if (!Algorithms.isEmpty(mode.getRoutingProfile()) || mode.getRouteService() != RouteService.OSMAND) {
for (RoutingProfileDataObject r : routingProfileDataObjects) {
if (mode.getRoutingProfile().equals(r.getStringKey())) {
if (mode.getRoutingProfile() != null && mode.getRoutingProfile().equals(r.getStringKey())
|| (mode.getRouteService() == RouteService.BROUTER
&& r.getStringKey().equals(RoutingProfilesResources.BROUTER_MODE.name()))
|| (mode.getRouteService() == RouteService.STRAIGHT
&& r.getStringKey().equals(RoutingProfilesResources.STRAIGHT_LINE_MODE.name()))) {
profile.routingProfileDataObject = r;
r.setSelected(true);
navTypeEt.setText(r.getName());