From a2f1febfe7b2846fecb13a7ae0fcd36212d6368e Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 1 Nov 2024 07:54:41 +0100 Subject: [PATCH] Fixed delete unseen option --- app/src/main/java/eu/faircode/email/Core.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index b360da13e2..dc8807c542 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -3937,7 +3937,8 @@ class Core { cal_keep.set(Calendar.MILLISECOND, 0); Calendar cal_keep_unread = Calendar.getInstance(); - cal_keep_unread.add(Calendar.DAY_OF_MONTH, -Math.max(keep_days * 6, EntityFolder.DEFAULT_KEEP * 6)); + cal_keep_unread.add(Calendar.DAY_OF_MONTH, + delete_unseen ? keep_days * 6 : -Math.max(keep_days * 6, EntityFolder.DEFAULT_KEEP * 6)); cal_keep_unread.set(Calendar.HOUR_OF_DAY, 0); cal_keep_unread.set(Calendar.MINUTE, 0); cal_keep_unread.set(Calendar.SECOND, 0);