Search in sources :

Example 1 with UserModel

use of com.mxt.anitrend.model.api.retro.anilist.UserModel in project anitrend-app by AniTrend.

the class NotificationSyncTask method onHandleInit.

private void onHandleInit(Context context) {
    presenter = new BasePresenter(context);
    if (presenter.getApplicationPref().isAuthenticated()) {
        UserModel requestModel = WebFactory.createService(UserModel.class, context);
        checkNotificationCount(requestModel);
    } else {
        JobSchedulerUtil.cancelJob(context);
        Log.e(TAG, "JobDispatcher has been unscheduled to avoid posting of notification while the user is not authenticated.");
    }
}
Also used : UserModel(com.mxt.anitrend.model.api.retro.anilist.UserModel) BasePresenter(com.mxt.anitrend.presenter.base.BasePresenter)

Aggregations

UserModel (com.mxt.anitrend.model.api.retro.anilist.UserModel)1 BasePresenter (com.mxt.anitrend.presenter.base.BasePresenter)1