add "Browse Map" to profiles list
This commit is contained in:
parent
818517fda8
commit
e6e541dc69
2 changed files with 6 additions and 2 deletions
|
@ -56,7 +56,7 @@ public class SelectMultipleProfilesBottomSheet extends BasePreferenceBottomSheet
|
||||||
|
|
||||||
private void refreshProfiles(OsmandApplication app) {
|
private void refreshProfiles(OsmandApplication app) {
|
||||||
profiles.clear();
|
profiles.clear();
|
||||||
profiles.addAll(NavigationFragment.getBaseProfiles(app));
|
profiles.addAll(NavigationFragment.getBaseProfiles(app, true));
|
||||||
for (ProfileDataObject profile : profiles) {
|
for (ProfileDataObject profile : profiles) {
|
||||||
String key = profile.getStringKey();
|
String key = profile.getStringKey();
|
||||||
profile.setSelected(selectedProfiles.contains(key));
|
profile.setSelected(selectedProfiles.contains(key));
|
||||||
|
|
|
@ -251,9 +251,13 @@ public class NavigationFragment extends BaseSettingsFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ProfileDataObject> getBaseProfiles(OsmandApplication app) {
|
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<>();
|
List<ProfileDataObject> profiles = new ArrayList<>();
|
||||||
for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
|
for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
|
||||||
if (mode != ApplicationMode.DEFAULT) {
|
if (mode != ApplicationMode.DEFAULT || includeBrowseMap) {
|
||||||
String description = mode.getDescription();
|
String description = mode.getDescription();
|
||||||
if (Algorithms.isEmpty(description)) {
|
if (Algorithms.isEmpty(description)) {
|
||||||
description = getAppModeDescription(app, mode);
|
description = getAppModeDescription(app, mode);
|
||||||
|
|
Loading…
Reference in a new issue