use of com.eventyay.organizer.data.role.Role in project open-event-orga-app by fossasia.
the class RoleInviteViewModel method createRoleInvite.
public void createRoleInvite(long roleId) {
long eventId = ContextManager.getSelectedEvent().getId();
Event event = new Event();
event.setId(eventId);
roleInvite.setEvent(event);
role.setId(roleId);
roleInvite.setRole(role);
compositeDisposable.add(roleRepository.sendRoleInvite(roleInvite).doOnSubscribe(disposable -> progress.setValue(true)).doFinally(() -> progress.setValue(false)).subscribe(sentRoleInvite -> {
success.setValue("Role Invite Sent");
dismiss.call();
}, throwable -> error.setValue(ErrorUtils.getMessage(throwable).toString())));
}
Aggregations