use of com.codeest.geeknews.model.bean.CommentBean in project GeekNews by codeestX.
the class CommentPresenter method getCommentData.
@Override
public void getCommentData(int id, int commentKind) {
if (commentKind == SHORT_COMMENT) {
Subscription rxSubscription = mRetrofitHelper.fetchShortCommentInfo(id).compose(RxUtil.<CommentBean>rxSchedulerHelper()).subscribe(new CommonSubscriber<CommentBean>(mView) {
@Override
public void onNext(CommentBean commentBean) {
mView.showContent(commentBean);
}
});
addSubscrebe(rxSubscription);
} else {
Subscription rxSubscription = mRetrofitHelper.fetchLongCommentInfo(id).compose(RxUtil.<CommentBean>rxSchedulerHelper()).subscribe(new CommonSubscriber<CommentBean>(mView) {
@Override
public void onNext(CommentBean commentBean) {
mView.showContent(commentBean);
}
});
addSubscrebe(rxSubscription);
}
}
Aggregations