Fix small issues

This commit is contained in:
Victor Shcherb 2015-11-15 20:54:20 +01:00
parent 0251252f7e
commit 2d4a19c24c
3 changed files with 9 additions and 3 deletions

View file

@ -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$

View file

@ -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;
}

View file

@ -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);
}
}