Fix merge conflict

This commit is contained in:
Vitaliy 2020-10-28 03:46:58 +02:00
parent dab1a37e33
commit 9f3d00eeb2
2 changed files with 7 additions and 3 deletions

View file

@ -906,6 +906,11 @@ public class AndroidUtils {
return value != null ? value : defValue;
}
public static String getIconStringPropertyName(Context ctx, String propertyName) {
String value = getStringByProperty(ctx, "icon_group_" + propertyName);
return value != null ? value : propertyName;
}
public static String getRenderingStringPropertyValue(Context ctx, String propertyValue) {
if (propertyValue == null) {
return "";

View file

@ -47,7 +47,6 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SettingsBaseActivity;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.ColorDialogs;
@ -595,9 +594,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
JSONObject categories = obj.getJSONObject("categories");
for (int i = 0; i < categories.length(); i++) {
JSONArray names = categories.names();
JSONObject icons = categories.getJSONObject(names.get(i).toString());
String name = names.get(i).toString();
String translatedName = SettingsBaseActivity.getIconStringPropertyName(app, name, name);
JSONObject icons = categories.getJSONObject(name);
String translatedName = AndroidUtils.getIconStringPropertyName(app, name);
iconCategories.put(translatedName, icons.getJSONArray("icons"));
}
} catch (JSONException e) {