Save previously selected application mode
This commit is contained in:
parent
ac7540ee2a
commit
8dbd53838f
2 changed files with 4 additions and 0 deletions
|
@ -469,6 +469,9 @@ public class OsmandSettings {
|
|||
}
|
||||
|
||||
|
||||
public final OsmandPreference<ApplicationMode> PREV_APPLICATION_MODE = new EnumIntPreference<ApplicationMode>(
|
||||
"prev_application_mode", ApplicationMode.DEFAULT, true, false, ApplicationMode.values());
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
// cache of metrics constants as they are used very often
|
||||
public final OsmandPreference<MetricsConstants> METRIC_SYSTEM = new EnumIntPreference<MetricsConstants>(
|
||||
|
|
|
@ -471,6 +471,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
ApplicationMode mode = getAppMode(buttons, settings);
|
||||
// change global settings
|
||||
settings.PREV_APPLICATION_MODE.set(settings.APPLICATION_MODE.get());
|
||||
boolean changed = settings.APPLICATION_MODE.set(mode);
|
||||
if (changed) {
|
||||
mapActivity.updateApplicationModeSettings();
|
||||
|
|
Loading…
Reference in a new issue