Add check for already set preference
This commit is contained in:
parent
8dedb3908a
commit
297edbcf11
1 changed files with 6 additions and 4 deletions
|
@ -328,6 +328,7 @@ public class OsmandSettings {
|
|||
HashMap<String, Boolean> quickActions = gson.fromJson(quickActionsJson, type);
|
||||
if (!Algorithms.isEmpty(quickActions)) {
|
||||
for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
|
||||
if (!QUICK_ACTION.isSetForMode(mode)) {
|
||||
Boolean actionState = quickActions.get(mode.getStringKey());
|
||||
if (actionState == null) {
|
||||
actionState = QUICK_ACTION.getDefaultValue();
|
||||
|
@ -337,6 +338,7 @@ public class OsmandSettings {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void migrateEnumPreferences() {
|
||||
for (OsmandPreference pref : registeredPreferences.values()) {
|
||||
|
|
Loading…
Reference in a new issue