From cb6fc9284272e6e8e9c390899f3b30e31c7d6ae4 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 31 Jan 2020 13:36:00 +0200 Subject: [PATCH] Fix custom modes initial order --- OsmAnd/src/net/osmand/plus/ApplicationMode.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/ApplicationMode.java b/OsmAnd/src/net/osmand/plus/ApplicationMode.java index 64f920a69e..859f1c4c8a 100644 --- a/OsmAnd/src/net/osmand/plus/ApplicationMode.java +++ b/OsmAnd/src/net/osmand/plus/ApplicationMode.java @@ -518,7 +518,10 @@ public class ApplicationMode { for (String appModeKey : settings.getCustomAppModesKeys()) { Object profilePreferences = settings.getProfilePreferences(appModeKey); String parent = settings.PARENT_APP_MODE.getValue(profilePreferences, null); + int order = settings.APP_MODE_ORDER.getValue(profilePreferences, values.size()); + ApplicationModeBuilder builder = createCustomMode(valueOfStringKey(parent, CAR), appModeKey); + builder.setOrder(order); builder.customReg(app); } }