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); }