Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-11-15 20:48:44 +01:00
commit 840ed41b4d
2 changed files with 6 additions and 8 deletions

View file

@ -416,7 +416,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
} else { } else {
title = R.string.osn_add_dialog_title; title = R.string.osn_add_dialog_title;
} }
AlertDialog dlg = (AlertDialog) dialog; final AlertDialog dlg = (AlertDialog) dialog;
dlg.setTitle(title); dlg.setTitle(title);
final View view = dlg.findViewById(R.id.layout); final View view = dlg.findViewById(R.id.layout);
Button btn = dlg.getButton(DialogInterface.BUTTON_POSITIVE); Button btn = dlg.getButton(DialogInterface.BUTTON_POSITIVE);
@ -447,8 +447,9 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
// AccessibleToast.makeText(activity, activity.getString(R.string.osb_author_or_password_not_specified), // AccessibleToast.makeText(activity, activity.getString(R.string.osb_author_or_password_not_specified),
// Toast.LENGTH_SHORT).show(); // Toast.LENGTH_SHORT).show();
// } // }
asyncActionTask(bug, text, action);
activity.getContextMenu().close(); activity.getContextMenu().close();
asyncActionTask(bug, text, action);
dlg.dismiss();
} }
} }
}); });
@ -456,13 +457,10 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
private Dialog createBugDialog(final Bundle args) { private Dialog createBugDialog(final Bundle args) {
AlertDialog.Builder builder = new AlertDialog.Builder(activity); AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.shared_string_commit);
builder.setTitle("");
final View view = activity.getLayoutInflater().inflate(R.layout.open_bug, null); final View view = activity.getLayoutInflater().inflate(R.layout.open_bug, null);
view.setId(R.id.layout); view.setId(R.id.layout);
builder.setView(view); builder.setView(view);
builder.setNegativeButton(R.string.shared_string_cancel, null); builder.setNegativeButton(R.string.shared_string_cancel, null);
builder.setPositiveButton(R.string.shared_string_commit, null); builder.setPositiveButton(R.string.shared_string_commit, null);
return builder.create(); return builder.create();

View file

@ -32,13 +32,13 @@ public class OsmBugsLocalUtil implements OsmBugsUtil {
OsmBugResult s = new OsmBugResult(); OsmBugResult s = new OsmBugResult();
s.local = p; s.local = p;
s.warning = success ? null : ""; s.warning = success ? null : "";
return null; return s;
} }
@Override @Override
public OsmBugResult reopenBug(double latitude, double longitude, long id, String text){ public OsmBugResult reopenBug(double latitude, double longitude, long id, String text){
OsmNotesPoint p = new OsmNotesPoint(); OsmNotesPoint p = new OsmNotesPoint();
p.setId(Math.min(-2, db.getMinID() -1)); p.setId(id);
p.setText(text); p.setText(text);
p.setLatitude(latitude); p.setLatitude(latitude);
p.setLongitude(longitude); p.setLongitude(longitude);