use of com.codeest.geeknews.model.http.response.WXHttpResponse in project GeekNews by codeestX.
the class WechatPresenter method getMoreWechatData.
@Override
public void getMoreWechatData() {
Observable<WXHttpResponse<List<WXItemBean>>> observable;
if (queryStr != null) {
observable = mRetrofitHelper.fetchWechatSearchListInfo(NUM_OF_PAGE, ++currentPage, queryStr);
} else {
observable = mRetrofitHelper.fetchWechatListInfo(NUM_OF_PAGE, ++currentPage);
}
Subscription rxSubscription = observable.compose(RxUtil.<WXHttpResponse<List<WXItemBean>>>rxSchedulerHelper()).compose(RxUtil.<List<WXItemBean>>handleWXResult()).subscribe(new CommonSubscriber<List<WXItemBean>>(mView, "没有更多了ヽ(≧Д≦)ノ") {
@Override
public void onNext(List<WXItemBean> wxItemBeen) {
mView.showMoreContent(wxItemBeen);
}
});
addSubscrebe(rxSubscription);
}
Aggregations