From 26ba21928fe40d9e6a6f8c432f14d7d4cb00379e Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 1 May 2022 08:57:13 +0200 Subject: [PATCH] Fallback to sent time --- app/src/main/java/eu/faircode/email/Core.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 7919258cd9..4c9e324154 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -3654,6 +3654,8 @@ class Core { if (full.contains(isub[j])) try { Date received = isub[j].getReceivedDate(); + if (received == null || received.getTime() == 0) + received = isub[j].getSentDate(); boolean unseen = (sync_unseen && !isub[j].isSet(Flags.Flag.SEEN)); boolean flagged = (sync_flagged && isub[j].isSet(Flags.Flag.FLAGGED)); if (received != null && received.getTime() < keep_time && !unseen && !flagged) {