add "Browse Map" to profiles list

This commit is contained in:
Nazar-Kutz 2020-05-14 15:14:08 +03:00
parent 818517fda8
commit e6e541dc69
2 changed files with 6 additions and 2 deletions

View file

@ -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));

View file

@ -251,9 +251,13 @@ public class NavigationFragment extends BaseSettingsFragment {
}
public static List<ProfileDataObject> getBaseProfiles(OsmandApplication app) {
return getBaseProfiles(app, false);
}
public static List<ProfileDataObject> getBaseProfiles(OsmandApplication app, boolean includeBrowseMap) {
List<ProfileDataObject> 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);