class WelcomePresenter extends BasePresenter<WelcomeMvpView> {

    public void getAccessToken(String code) {
        checkViewAttached();
        getMvpView().showLoadingState(true);
        mSubscription = mDataManager.getAccessToken(code)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new SingleSubscriber<AccessToken>() {
                    @Override
                    public void onSuccess(AccessToken accessToken) {
                        getMvpView().showLoadingState(false);
                        getMvpView().launchMainActivity();
                    }

                    @Override
                    public void onError(Throwable error) {
                        getMvpView().showLoadingState(false);
                        Timber.e(error, "There was a problem retrieving the access token");
                        getMvpView().showAccessTokenError();
                    }
                });
    }

    @Inject public  WelcomePresenter(DataManager dataManager);

}