use of com.odysee.app.adapter.InviteeListAdapter in project odysee-android by OdyseeTeam.
the class InvitesFragment method fetchInviteStatus.
private void fetchInviteStatus() {
FetchInviteStatusTask task = new FetchInviteStatusTask(progressLoadingStatus, new FetchInviteStatusTask.FetchInviteStatusHandler() {
@Override
public void onSuccess(List<Invitee> invitees) {
if (inviteHistoryAdapter == null) {
inviteHistoryAdapter = new InviteeListAdapter(invitees, getContext());
inviteHistoryAdapter.addHeader();
} else {
inviteHistoryAdapter.addInvitees(invitees);
}
if (inviteHistoryList != null) {
inviteHistoryList.setAdapter(inviteHistoryAdapter);
}
Helper.setViewVisibility(inviteHistoryList, inviteHistoryAdapter == null || inviteHistoryAdapter.getItemCount() < 2 ? View.GONE : View.VISIBLE);
}
@Override
public void onError(Exception error) {
Helper.setViewVisibility(inviteHistoryList, inviteHistoryAdapter == null || inviteHistoryAdapter.getItemCount() < 2 ? View.GONE : View.VISIBLE);
}
});
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
Aggregations