mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 07:32:08 +01:00
Added explicit cleanup
This commit is contained in:
@@ -233,12 +233,6 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onMenuPrivacy();
|
||||
}
|
||||
}, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onCleanup();
|
||||
}
|
||||
}));
|
||||
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_info_24, R.string.menu_about, new Runnable() {
|
||||
@@ -437,21 +431,6 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||
Helper.view(this, Helper.getIntentPrivacy());
|
||||
}
|
||||
|
||||
private void onCleanup() {
|
||||
new SimpleTask<Void>() {
|
||||
@Override
|
||||
protected Void onExecute(Context context, Bundle args) {
|
||||
WorkerCleanup.cleanup(context, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getSupportFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "cleanup:run");
|
||||
}
|
||||
|
||||
private void onMenuAbout() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("about", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
Reference in New Issue
Block a user