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.");
}
}
Aggregations