From c52d0ddce914afeb2bb1988b4e279f2c6afb3bc9 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 9 Jun 2023 08:37:55 +0200 Subject: [PATCH] Reduced delete keep time to 1 hour --- app/src/main/java/eu/faircode/email/Core.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index d5a92527a2..07b1ef23c7 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -3615,8 +3615,9 @@ class Core { Log.i(folder.name + " sync=" + new Date(sync_time) + " keep=" + new Date(keep_time)); // Delete old local messages + long delete_time = new Date().getTime() - 3600 * 1000L; if (auto_delete) { - List tbds = db.message().getMessagesBefore(folder.id, sync_time, keep_time, delete_unseen); + List tbds = db.message().getMessagesBefore(folder.id, delete_time, keep_time, delete_unseen); Log.i(folder.name + " local tbd=" + tbds.size()); EntityFolder trash = db.folder().getFolderByType(folder.account, EntityFolder.TRASH); for (Long tbd : tbds) { @@ -3629,7 +3630,7 @@ class Core { EntityOperation.queue(context, message, EntityOperation.MOVE, trash.id); } } else { - int old = db.message().deleteMessagesBefore(folder.id, sync_time, keep_time, delete_unseen); + int old = db.message().deleteMessagesBefore(folder.id, delete_time, keep_time, delete_unseen); Log.i(folder.name + " local old=" + old); }