Boat navigation is enabled with Nautical plugin
This commit is contained in:
parent
5d646c7396
commit
cae1baa6e5
1 changed files with 1 additions and 2 deletions
|
@ -91,8 +91,7 @@ public class NauticalMapsPlugin extends OsmandPlugin {
|
||||||
public void addBoatProfile(boolean flag) {
|
public void addBoatProfile(boolean flag) {
|
||||||
Set<ApplicationMode> selectedProfiles = new LinkedHashSet<>(ApplicationMode.values(app.getSettings()));
|
Set<ApplicationMode> selectedProfiles = new LinkedHashSet<>(ApplicationMode.values(app.getSettings()));
|
||||||
boolean isBoatEnabled = selectedProfiles.contains(ApplicationMode.BOAT);
|
boolean isBoatEnabled = selectedProfiles.contains(ApplicationMode.BOAT);
|
||||||
if((!isBoatEnabled && flag) ||
|
if((!isBoatEnabled && flag) || (isBoatEnabled && !flag)) {
|
||||||
((isBoatEnabled && !flag))) {
|
|
||||||
String s = app.getSettings().AVAILABLE_APP_MODES.get();
|
String s = app.getSettings().AVAILABLE_APP_MODES.get();
|
||||||
String currModes = flag ? s + ApplicationMode.BOAT.getStringKey() + ","
|
String currModes = flag ? s + ApplicationMode.BOAT.getStringKey() + ","
|
||||||
: s.replace(ApplicationMode.BOAT.getStringKey() + ",", "");
|
: s.replace(ApplicationMode.BOAT.getStringKey() + ",", "");
|
||||||
|
|
Loading…
Reference in a new issue