mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
999669918d
commit
66bad2312f
|
@ -277,6 +277,9 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void onExecute(Context context, Bundle args) {
|
protected Void onExecute(Context context, Bundle args) {
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
prefs.edit().putBoolean("vacuum", true).apply();
|
||||||
|
|
||||||
WorkerCleanup.cleanup(context, true);
|
WorkerCleanup.cleanup(context, true);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,12 +105,11 @@ public class WorkerCleanup extends Worker {
|
||||||
for (EntityMessage message : db.message().getSnoozed())
|
for (EntityMessage message : db.message().getSnoozed())
|
||||||
EntityMessage.snooze(context, message.id, message.ui_snoozed);
|
EntityMessage.snooze(context, message.id, message.ui_snoozed);
|
||||||
|
|
||||||
|
ServiceSynchronize.reschedule(context);
|
||||||
|
|
||||||
// Clear last search
|
// Clear last search
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
prefs.edit()
|
prefs.edit().remove("last_search").apply();
|
||||||
.remove("last_search")
|
|
||||||
.putBoolean("vacuum", true)
|
|
||||||
.apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
long now = new Date().getTime();
|
long now = new Date().getTime();
|
||||||
|
|
Loading…
Reference in New Issue