Small improvement

This commit is contained in:
M66B 2020-01-06 12:30:14 +01:00
parent 999669918d
commit 66bad2312f
2 changed files with 6 additions and 4 deletions

View File

@ -277,6 +277,9 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
@Override
protected Void onExecute(Context context, Bundle args) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit().putBoolean("vacuum", true).apply();
WorkerCleanup.cleanup(context, true);
return null;
}

View File

@ -105,12 +105,11 @@ public class WorkerCleanup extends Worker {
for (EntityMessage message : db.message().getSnoozed())
EntityMessage.snooze(context, message.id, message.ui_snoozed);
ServiceSynchronize.reschedule(context);
// Clear last search
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit()
.remove("last_search")
.putBoolean("vacuum", true)
.apply();
prefs.edit().remove("last_search").apply();
}
long now = new Date().getTime();