Reduced delete keep time to 1 hour

pull/212/head
M66B 2 years ago
parent cb8230823b
commit c52d0ddce9

@ -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<Long> tbds = db.message().getMessagesBefore(folder.id, sync_time, keep_time, delete_unseen);
List<Long> 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);
}

Loading…
Cancel
Save