fix close changeset
This commit is contained in:
parent
861831980f
commit
674f552356
2 changed files with 6 additions and 2 deletions
|
@ -570,7 +570,6 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: 8/28/15 Move to helper
|
||||
public static class ShowDeleteDialogAsyncTask extends AsyncTask<Amenity, Void, Node> {
|
||||
private final OpenstreetmapUtil openstreetmapUtil;
|
||||
private final AppCompatActivity activity;
|
||||
|
|
|
@ -45,6 +45,7 @@ public class UploadOpenstreetmapPointAsyncTask
|
|||
protected Map<OsmPoint, String> doInBackground(OsmPoint... points) {
|
||||
Map<OsmPoint, String> loadErrorsMap = new HashMap<>();
|
||||
|
||||
boolean uploaded = false;
|
||||
for (OsmPoint point : points) {
|
||||
if (interruptUploading)
|
||||
break;
|
||||
|
@ -56,8 +57,9 @@ public class UploadOpenstreetmapPointAsyncTask
|
|||
entityInfo = remotepoi.loadNode(p.getEntity());
|
||||
}
|
||||
Node n = remotepoi.commitNodeImpl(p.getAction(), p.getEntity(), entityInfo,
|
||||
p.getComment(), closeChangeSet);
|
||||
p.getComment(), false);
|
||||
if (n != null) {
|
||||
uploaded = true;
|
||||
plugin.getDBPOI().deletePOI(p);
|
||||
publishProgress(p);
|
||||
}
|
||||
|
@ -79,6 +81,9 @@ public class UploadOpenstreetmapPointAsyncTask
|
|||
loadErrorsMap.put(point, errorMessage);
|
||||
}
|
||||
}
|
||||
if(uploaded) {
|
||||
remotepoi.closeChangeSet();
|
||||
}
|
||||
|
||||
return loadErrorsMap;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue