use of net.osmand.plus.plugins.osmedit.helpers.OsmBugsUtil in project Osmand by osmandapp.
the class OsmBugsLayer method showBugDialog.
private void showBugDialog(@NonNull MapActivity mapActivity, final OpenStreetNote bug, final Action action, String text) {
int posButtonTextId;
int titleTextId;
if (action == Action.DELETE) {
posButtonTextId = R.string.osn_close_dialog_title;
titleTextId = R.string.osm_edit_close_note;
} else if (action == Action.MODIFY) {
posButtonTextId = R.string.osn_comment_dialog_title;
titleTextId = R.string.osm_edit_comment_note;
} else if (action == Action.REOPEN) {
posButtonTextId = R.string.osn_reopen_dialog_title;
titleTextId = R.string.osn_reopen_dialog_title;
} else {
posButtonTextId = R.string.osn_add_dialog_title;
titleTextId = R.string.context_menu_item_open_note;
}
OsmBugsUtil util = getOsmBugsUtil(bug);
final boolean offline = util instanceof OsmBugsLocalUtil;
createBugDialog(mapActivity, offline, text, titleTextId, posButtonTextId, action, bug, null);
}
Aggregations