From e6e541dc69c95e0f8689be31dd0bc5289f99dc12 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Thu, 14 May 2020 15:14:08 +0300 Subject: [PATCH] add "Browse Map" to profiles list --- .../plus/profiles/SelectMultipleProfilesBottomSheet.java | 2 +- OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfilesBottomSheet.java b/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfilesBottomSheet.java index b0cffe7c0c..3929703cbf 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfilesBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfilesBottomSheet.java @@ -56,7 +56,7 @@ public class SelectMultipleProfilesBottomSheet extends BasePreferenceBottomSheet private void refreshProfiles(OsmandApplication app) { profiles.clear(); - profiles.addAll(NavigationFragment.getBaseProfiles(app)); + profiles.addAll(NavigationFragment.getBaseProfiles(app, true)); for (ProfileDataObject profile : profiles) { String key = profile.getStringKey(); profile.setSelected(selectedProfiles.contains(key)); diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 30d2d64805..ba5f216c6b 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -251,9 +251,13 @@ public class NavigationFragment extends BaseSettingsFragment { } public static List getBaseProfiles(OsmandApplication app) { + return getBaseProfiles(app, false); + } + + public static List getBaseProfiles(OsmandApplication app, boolean includeBrowseMap) { List profiles = new ArrayList<>(); for (ApplicationMode mode : ApplicationMode.allPossibleValues()) { - if (mode != ApplicationMode.DEFAULT) { + if (mode != ApplicationMode.DEFAULT || includeBrowseMap) { String description = mode.getDescription(); if (Algorithms.isEmpty(description)) { description = getAppModeDescription(app, mode);