aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-folder-cache.c7
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