use of io.jawg.osmcontributor.ui.events.map.NewNoteCreatedEvent in project osm-contributor by jawg.
the class NoteManager method onPleaseApplyNewComment.
@Subscribe(threadMode = ThreadMode.ASYNC)
public void onPleaseApplyNewComment(PleaseApplyNewComment event) {
Timber.d("please apply new comment");
if (loginManager.checkCredentials()) {
Note note = syncNoteManager.remoteAddComment(createComment(event.getNote(), event.getAction(), event.getText()));
if (note != null) {
mergeBackendNote(note);
bus.post(new NewNoteCreatedEvent(note.getId()));
bus.post(new SyncFinishUploadNote(note));
}
} else {
bus.post(new ApplyNewCommentFailedEvent());
}
}
Aggregations