From d3027e6fa9158b10ef87c3f6433dac5917e0891d Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 21 Aug 2001 14:27:48 +0000 Subject: Fix the duplicate message check so it doesn't mess up threading when a * camel-folder-thread.c (camel_folder_thread_messages_new_summary): Fix the duplicate message check so it doesn't mess up threading when a reply appears in the folder before the message it's a reply to. Fixes bug #3357. (camel_folder_thread_messages_new): Likewise, although I don't think this function is used any more. svn path=/trunk/; revision=12341 --- camel/ChangeLog | 9 +++++++++ camel/camel-folder-thread.c | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 38657f1458..72383e203f 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,12 @@ +2001-08-21 Dan Winship + + * camel-folder-thread.c + (camel_folder_thread_messages_new_summary): Fix the duplicate + message check so it doesn't mess up threading when a reply appears + in the folder before the message it's a reply to. Fixes bug #3357. + (camel_folder_thread_messages_new): Likewise, although I don't + think this function is used any more. + 2001-08-20 JP Rosevear * Makefile.am: build a static camel for the addressbook conduit diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c index 4417668ae1..40f0d3d77f 100644 --- a/camel/camel-folder-thread.c +++ b/camel/camel-folder-thread.c @@ -484,13 +484,13 @@ camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids) if (mi->message_id.id.id) { c = g_hash_table_lookup(id_table, &mi->message_id); /* check for duplicate messages */ - if (c) { + if (c && c->order) { /* if duplicate, just make out it is a no-id message, but try and insert it into the right spot in the tree */ d(printf("doing: (duplicate message id)\n")); c = e_memchunk_alloc0(thread->node_chunks); g_hash_table_insert(no_id_table, (void *)mi, c); - } else { + } else if (!c) { d(printf("doing : %08x%08x (%s)\n", mi->message_id.id.part.hi, mi->message_id.id.part.lo, camel_message_info_subject(mi))); c = e_memchunk_alloc0(thread->node_chunks); g_hash_table_insert(id_table, (void *)&mi->message_id, c); @@ -635,13 +635,13 @@ camel_folder_thread_messages_new_summary(GPtrArray *summary) if (mi->message_id.id.id) { c = g_hash_table_lookup(id_table, &mi->message_id); /* check for duplicate messages */ - if (c) { + if (c && c->order) { /* if duplicate, just make out it is a no-id message, but try and insert it into the right spot in the tree */ d(printf("doing: (duplicate message id)\n")); c = e_memchunk_alloc0(thread->node_chunks); g_hash_table_insert(no_id_table, (void *)mi, c); - } else { + } else if (!c) { d(printf("doing : %08x%08x (%s)\n", mi->message_id.id.part.hi, mi->message_id.id.part.lo, camel_message_info_subject(mi))); c = e_memchunk_alloc0(thread->node_chunks); g_hash_table_insert(id_table, (void *)&mi->message_id, c); -- cgit v1.2.3