From ccda609fa9911087580666b08e00a2c6c9996e5f Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Mon, 20 Nov 2017 15:43:37 +0200 Subject: [PATCH] Fix category --- .../src/net/osmand/plus/osmedit/OsmEditsAdapter.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java index 45edd4b597..2c46593fa2 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java @@ -11,8 +11,6 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; -import net.osmand.osm.edit.Node; -import net.osmand.osm.edit.OSMSettings; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.render.RenderingIcons; @@ -159,9 +157,9 @@ public class OsmEditsAdapter extends ArrayAdapter { action = getContext().getString(R.string.shared_string_edited); } - String subtype = ""; - if (point.getGroup() == OsmPoint.Group.POI && !Algorithms.isEmpty(((OpenstreetmapPoint) point).getSubtype())) { - subtype = ((OpenstreetmapPoint) point).getSubtype(); + String category = ""; + if (point.getGroup() == OsmPoint.Group.POI) { + category = ((OpenstreetmapPoint) point).getEntity().getTag(EditPoiData.POI_TYPE_TAG); } String prefix = OsmEditingPlugin.getPrefix(point); @@ -170,8 +168,8 @@ public class OsmEditsAdapter extends ArrayAdapter { if (!Algorithms.isEmpty(action)) { description += action + " • "; } - if (!Algorithms.isEmpty(subtype)) { - description += subtype + " • "; + if (!Algorithms.isEmpty(category)) { + description += category + " • "; } description += prefix;