Search in sources :

Example 1 with WelcomeBean

use of com.codeest.geeknews.model.bean.WelcomeBean in project GeekNews by codeestX.

the class WelcomePresenter method getWelcomeData.

@Override
public void getWelcomeData() {
    Subscription rxSubscription = mRetrofitHelper.fetchWelcomeInfo(RES).compose(RxUtil.<WelcomeBean>rxSchedulerHelper()).subscribe(new Action1<WelcomeBean>() {

        @Override
        public void call(WelcomeBean welcomeBean) {
            mView.showContent(welcomeBean);
            startCountDown();
        }
    }, new Action1<Throwable>() {

        @Override
        public void call(Throwable throwable) {
            mView.jumpToMain();
        }
    });
    addSubscrebe(rxSubscription);
}
Also used : WelcomeBean(com.codeest.geeknews.model.bean.WelcomeBean) Subscription(rx.Subscription)

Aggregations

WelcomeBean (com.codeest.geeknews.model.bean.WelcomeBean)1 Subscription (rx.Subscription)1