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 | |
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
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/mail-folder-cache.c | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index f953bfcb32..a8beaf91ee 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,13 @@ 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. + +2008-03-27 Milan Crha <mcrha@redhat.com> + ** Part of fix for bug #519292 * message-list.h: (message_list_set_expand_all): 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 |