Search in sources :

Example 1 with PoisAndNotesDownloadedEvent

use of io.jawg.osmcontributor.model.events.PoisAndNotesDownloadedEvent in project osm-contributor by jawg.

the class SyncManager method onSyncDownloadPoisAndNotesEvent.

// ********************************
// ************ Events ************
// ********************************
@Subscribe(threadMode = ThreadMode.ASYNC)
public void onSyncDownloadPoisAndNotesEvent(SyncDownloadPoisAndNotesEvent event) {
    syncDownloadPoiBox(event.getBox());
    List<Note> notes = syncNoteManager.syncDownloadNotesInBox(event.getBox());
    if (notes != null && notes.size() > 0) {
        noteManager.mergeBackendNotes(notes);
    }
    bus.post(new PoisAndNotesDownloadedEvent());
}
Also used : Note(io.jawg.osmcontributor.model.entities.Note) PoisAndNotesDownloadedEvent(io.jawg.osmcontributor.model.events.PoisAndNotesDownloadedEvent) Subscribe(org.greenrobot.eventbus.Subscribe)

Aggregations

Note (io.jawg.osmcontributor.model.entities.Note)1 PoisAndNotesDownloadedEvent (io.jawg.osmcontributor.model.events.PoisAndNotesDownloadedEvent)1 Subscribe (org.greenrobot.eventbus.Subscribe)1