From 2d4a19c24c5a95b7214930179b7cf0a2c0549d26 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 15 Nov 2015 20:54:20 +0100 Subject: [PATCH] Fix small issues --- OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java | 2 +- OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java | 8 ++++++-- OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java index f7d5708cd8..bcf411e80f 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java @@ -61,7 +61,7 @@ public class OsmBugsRemoteUtil implements OsmBugsUtil { @Override public OsmBugResult reopenBug(double latitude, double longitude, long id, String text){ StringBuilder b = new StringBuilder(); - b.append(getNotesApi()).append("?"); //$NON-NLS-1$ + b.append(getNotesApi()).append("/"); //$NON-NLS-1$ b.append(id); //$NON-NLS-1$ b.append("/reopen?text=").append(URLEncoder.encode(text)); //$NON-NLS-1$ return editingPOI(b.toString(), "POST", "reopen bug"); //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 33fb11f677..7beb2d2503 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -346,9 +346,13 @@ public class OsmEditingPlugin extends OsmandPlugin { public static String getEditName(OsmPoint point) { String prefix = getPrefix(point); if (point.getGroup() == OsmPoint.Group.POI) { - return prefix + " (" + ((OpenstreetmapPoint) point).getSubtype() + ") " + ((OpenstreetmapPoint) point).getName(); + String subtype = ""; + if (!Algorithms.isEmpty(((OpenstreetmapPoint) point).getSubtype())) { + subtype = " (" + ((OpenstreetmapPoint) point).getSubtype() + ") "; + } + return prefix + subtype + ((OpenstreetmapPoint) point).getName(); } else if (point.getGroup() == OsmPoint.Group.BUG) { - return prefix + " (" + ((OsmNotesPoint) point).getAuthor() + ") " + ((OsmNotesPoint) point).getText(); + return prefix + ((OsmNotesPoint) point).getText(); } else { return prefix; } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java index ab1117f520..06730f1827 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java @@ -352,6 +352,8 @@ public class OsmEditsFragment extends OsmAndListFragment descr.setText(R.string.action_modify); } else if (child.getAction() == OsmPoint.Action.DELETE) { descr.setText(R.string.action_delete); + } else if (child.getAction() == OsmPoint.Action.REOPEN) { + descr.setText(R.string.action_modify); } }