Search in sources :

Example 1 with PoiTypeDeletedEvent

use of io.jawg.osmcontributor.ui.events.type.PoiTypeDeletedEvent in project osm-contributor by jawg.

the class TypeManager method onInternalRemovePoiTypeEvent.

@Subscribe(threadMode = ThreadMode.ASYNC)
public void onInternalRemovePoiTypeEvent(InternalRemovePoiTypeEvent event) {
    PoiType poiType = event.getPoiType();
    poiManager.deletePoiType(poiType);
    Timber.i("Removed poi type %d", poiType.getId());
    bus.post(new PoiTypeDeletedEvent(poiType));
    bus.post(new PoiTypesLoaded(poiManager.getPoiTypesSortedByName()));
}
Also used : PoiTypeDeletedEvent(io.jawg.osmcontributor.ui.events.type.PoiTypeDeletedEvent) PoiType(io.jawg.osmcontributor.model.entities.PoiType) PoiTypesLoaded(io.jawg.osmcontributor.model.events.PoiTypesLoaded) Subscribe(org.greenrobot.eventbus.Subscribe)

Aggregations

PoiType (io.jawg.osmcontributor.model.entities.PoiType)1 PoiTypesLoaded (io.jawg.osmcontributor.model.events.PoiTypesLoaded)1 PoiTypeDeletedEvent (io.jawg.osmcontributor.ui.events.type.PoiTypeDeletedEvent)1 Subscribe (org.greenrobot.eventbus.Subscribe)1