[evolution-data-server] Bug #632692 - Thread by In-Reply-To, then first found reference
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #632692 - Thread by In-Reply-To, then first found reference
- Date: Wed, 10 Nov 2010 15:37:34 +0000 (UTC)
commit f36d7304124296fd19580e6189e61fca78279f6c
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 10 16:34:11 2010 +0100
Bug #632692 - Thread by In-Reply-To, then first found reference
camel/camel-folder-thread.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index 6674411..956fc75 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -478,6 +478,8 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
d(printf("%s (%s) references:\n", G_STRLOC, G_STRFUNC); )
for (j=0;j<references->size;j++) {
+ gboolean found = FALSE;
+
/* should never be empty, but just incase */
if (references->references[j].id.id == 0)
continue;
@@ -487,9 +489,16 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
d(printf("%s (%s) not found\n", G_STRLOC, G_STRFUNC));
c = e_memchunk_alloc0 (thread->node_chunks);
g_hash_table_insert (id_table, (gpointer)&references->references[j], c);
- }
- if (c!=child)
+ } else
+ found = TRUE;
+ if (c != child) {
container_parent_child (c, child);
+ /* Stop on the first parent found, no need to reparent
+ it once it's placed in. Also, references are from
+ parent to root, thus this should do the right thing. */
+ if (found)
+ break;
+ }
child = c;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]