use of com.mxt.anitrend.base.custom.presenter.CommonPresenter in project anitrend-app by AniTrend.
the class WebTokenRequest method invalidateInstance.
/**
* Invalidate authentication state, defaulting to signed out state
* and disable sync services
*/
public static void invalidateInstance(Context context) {
CommonPresenter presenter = new BasePresenter(context);
presenter.getSettings().setAuthenticated(false);
presenter.getSettings().setLastDismissedNotificationId(-1);
presenter.getDatabase().invalidateBoxStores();
KoinExt.get(JobSchedulerUtil.class).cancelNotificationJob(context);
WebFactory.invalidate();
token = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1)
ShortcutUtil.removeAllDynamicShortcuts(context);
KoinExt.get(ISupportAnalytics.class).clearUserSession();
}
Aggregations