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,11 +328,13 @@ public class OsmandSettings {
|
|||
HashMap<String, Boolean> quickActions = gson.fromJson(quickActionsJson, type);
|
||||
if (!Algorithms.isEmpty(quickActions)) {
|
||||
for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
|
||||
Boolean actionState = quickActions.get(mode.getStringKey());
|
||||
if (actionState == null) {
|
||||
actionState = QUICK_ACTION.getDefaultValue();
|
||||
if (!QUICK_ACTION.isSetForMode(mode)) {
|
||||
Boolean actionState = quickActions.get(mode.getStringKey());
|
||||
if (actionState == null) {
|
||||
actionState = QUICK_ACTION.getDefaultValue();
|
||||
}
|
||||
setPreference(QUICK_ACTION.getId(), actionState, mode);
|
||||
}
|
||||
setPreference(QUICK_ACTION.getId(), actionState, mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue