use of me.zhanghai.android.douya.eventbus.DoulistUpdatedEvent in project Douya by DreaminginCodeZH.
the class BaseDoulistResource method onLoadFinished.
@Override
protected void onLoadFinished(boolean more, int count, boolean successful, List<Doulist> response, ApiError error) {
if (successful) {
if (more) {
append(response);
getListener().onLoadDoulistListFinished(getRequestCode());
getListener().onDoulistListAppended(getRequestCode(), Collections.unmodifiableList(response));
} else {
set(response);
getListener().onLoadDoulistListFinished(getRequestCode());
getListener().onDoulistListChanged(getRequestCode(), Collections.unmodifiableList(get()));
}
for (Doulist doulist : response) {
EventBusUtils.postAsync(new DoulistUpdatedEvent(doulist, this));
}
} else {
getListener().onLoadDoulistListFinished(getRequestCode());
getListener().onLoadDoulistListError(getRequestCode(), error);
}
}
Aggregations