private void sendNews(String newsMessage) { onLoadBegins(); mRestService.addEventNews( User.currentUser().getUserId(), mEvent.getId(), newsMessage, new HttpHelper.RestCallback<Status>() { @Override public void failure(Status restError) { onLoadFinished(); } @Override public void success(Status status, Response response) { Toast.makeText(getActivity(), R.string.enf_new_added_success, Toast.LENGTH_SHORT) .show(); mAdapter.resetData(); loadEventNews(0); onLoadFinished(); } }); }
private void loadEventNews(int page) { mRestService.getEventNews(mEvent.getId(), page, HttpHelper.DEFAULT_COUNT, mLoaderCallback); }
@Override public String getTitle() { return mEvent.getName(); }