From dbb506b6434f336bf63a6095b145c99326d84397 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 27 Mar 2008 12:00:31 +0000 Subject: ** Fix for bug #522178 2008-03-27 Milan Crha ** Fix for bug #522178 * mail-folder-cache.c: (folder_changed): Put back hack with checking time of new message in the folder based with last time of new mail as it was before patch in bug #492702. svn path=/trunk/; revision=35273 --- mail/mail-folder-cache.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 95709e7d5f..1c1ad89a89 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -389,6 +389,7 @@ create_folders(CamelFolderInfo *fi, struct _store_info *si) static void folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) { + static time_t last_newmail = 0; CamelFolderChangeInfo *changes = event_data; CamelFolder *folder = (CamelFolder *)o; CamelStore *store = folder->parent_store; @@ -414,12 +415,16 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) flags = camel_message_info_flags (info); if (((flags & CAMEL_MESSAGE_SEEN) == 0) && ((flags & CAMEL_MESSAGE_JUNK) == 0) && - ((flags & CAMEL_MESSAGE_DELETED) == 0)) + ((flags & CAMEL_MESSAGE_DELETED) == 0) && + (camel_message_info_date_received (info) > last_newmail)) new++; } } } + if (new > 0 || !last_newmail) + time (&last_newmail); + LOCK(info_lock); if (stores != NULL && (si = g_hash_table_lookup(stores, store)) != NULL -- cgit