mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-28 08:32:16 +01:00
Allow manual cleanup
This commit is contained in:
@@ -233,6 +233,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
case R.string.menu_faq:
|
||||
onDebugInfo();
|
||||
return true;
|
||||
case R.string.menu_privacy:
|
||||
onCleanup();
|
||||
return true;
|
||||
case R.string.menu_about:
|
||||
onShowLog();
|
||||
return true;
|
||||
@@ -1020,6 +1023,21 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
}.load(this, new Bundle());
|
||||
}
|
||||
|
||||
private void onCleanup() {
|
||||
new SimpleTask<Void>() {
|
||||
@Override
|
||||
protected Void onLoad(Context context, Bundle args) throws Throwable {
|
||||
JobDaily.cleanup(ActivityView.this);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(ActivityView.this, ActivityView.this, ex);
|
||||
}
|
||||
}.load(this, new Bundle());
|
||||
}
|
||||
|
||||
private void onShowLog() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("logs", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
Reference in New Issue
Block a user