diff options
author | Milan Crha <mcrha@redhat.com> | 2008-03-27 20:00:31 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-03-27 20:00:31 +0800 |
commit | dbb506b6434f336bf63a6095b145c99326d84397 (patch) | |
tree | de936c7e6bda354502df4eae6699471dfb34b043 /mail/mail-folder-cache.c | |
parent | 7ea7aa0b494b5e0ed009c5b5475024fd472c8a31 (diff) | |
download | gsoc2013-evolution-dbb506b6434f336bf63a6095b145c99326d84397.tar.gz gsoc2013-evolution-dbb506b6434f336bf63a6095b145c99326d84397.tar.zst gsoc2013-evolution-dbb506b6434f336bf63a6095b145c99326d84397.zip |
** Fix for bug #522178
2008-03-27 Milan Crha <mcrha@redhat.com>
** 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
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 |