mirror of https://github.com/M66B/FairEmail.git
Cleanup: restart workers
This commit is contained in:
parent
78f8f16f65
commit
8b9cfc24a9
|
@ -2314,13 +2314,18 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
@Override
|
@Override
|
||||||
protected Void onExecute(Context context, Bundle args) {
|
protected Void onExecute(Context context, Bundle args) {
|
||||||
WorkerCleanup.cleanup(context, true);
|
WorkerCleanup.cleanup(context, true);
|
||||||
WorkManager.getInstance(context).pruneWork();
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, Void data) {
|
protected void onExecuted(Bundle args, Void data) {
|
||||||
ToastEx.makeText(getContext(), R.string.title_completed, Toast.LENGTH_LONG).show();
|
final Context context = getContext();
|
||||||
|
WorkManager.getInstance(context).pruneWork();
|
||||||
|
WorkerAutoUpdate.init(context);
|
||||||
|
WorkerCleanup.init(context);
|
||||||
|
WorkerDailyRules.init(context);
|
||||||
|
WorkerSync.init(context);
|
||||||
|
ToastEx.makeText(context, R.string.title_completed, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue