Search in sources :

Example 1 with OsmBugsLocalUtil

use of net.osmand.plus.plugins.osmedit.helpers.OsmBugsLocalUtil 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);
}
Also used : OsmBugsUtil(net.osmand.plus.plugins.osmedit.helpers.OsmBugsUtil) OsmBugsLocalUtil(net.osmand.plus.plugins.osmedit.helpers.OsmBugsLocalUtil) OsmPoint(net.osmand.plus.plugins.osmedit.data.OsmPoint) OsmNotesPoint(net.osmand.plus.plugins.osmedit.data.OsmNotesPoint)

Aggregations

OsmNotesPoint (net.osmand.plus.plugins.osmedit.data.OsmNotesPoint)1 OsmPoint (net.osmand.plus.plugins.osmedit.data.OsmPoint)1 OsmBugsLocalUtil (net.osmand.plus.plugins.osmedit.helpers.OsmBugsLocalUtil)1 OsmBugsUtil (net.osmand.plus.plugins.osmedit.helpers.OsmBugsUtil)1