Merge pull request #8963 from osmandapp/AddBrowseMap
add "Browse Map" to profiles list
This commit is contained in:
commit
d7a6fa6606
2 changed files with 6 additions and 2 deletions
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue