@Override
public void fetchDataByNetWork(final int newsID) {
Observable<Comments> short_comments_service = RetrofitSingleton.getApiService((Activity) mCommentView).shortComment(newsID);
Observable<Comments> long_comments_service = RetrofitSingleton.getApiService((Activity) mCommentView).longComment(newsID);
Observable.zip(short_comments_service, long_comments_service, new Func2<Comments, Comments, Comments1>(){
@Override
public Comments1 call(Comments comments, Comments comments2) {
Comments1 comments1 = new Comments1();
comments1.long_comments = comments.comments;
comments1.short_comments = comments2.comments;
return comments1;
}
})
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(observer);
}
CommentPresenter.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:zhihudailysoap
作者:
评论列表
文章目录