[evolution-data-server] Bug 769620 - Ensure Date field is filled in the folder summary



commit 9210a99d95fbed5aaf3baf131c0730d6c9f4e55f
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 18 15:01:55 2016 +0200

    Bug 769620 - Ensure Date field is filled in the folder summary

 camel/camel-folder-summary.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 1f8577a..71a8d31 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -3719,6 +3719,14 @@ message_info_new_from_header (CamelFolderSummary *summary,
        else
                mi->date_received = 0;
 
+       /* Fallback to Received date, when the Date header is missing */
+       if (!mi->date_sent)
+               mi->date_sent = mi->date_received;
+
+       /* If neither Received is available, then use the current time. */
+       if (!mi->date_sent)
+               mi->date_sent = time (NULL);
+
        msgid = camel_header_msgid_decode (camel_header_raw_find (&h, "message-id", NULL));
        if (msgid) {
                GChecksum *checksum;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]