changeset 7789:0d6531065d89 HEAD

Removed recently added wrong code.
author Timo Sirainen <tss@iki.fi>
date Tue, 13 May 2008 05:18:56 +0300
parents 3718262bec49
children 05511835e4b1
files src/imap/imap-thread-finish.c
diffstat 1 files changed, 6 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/imap-thread-finish.c	Tue May 13 04:41:02 2008 +0300
+++ b/src/imap/imap-thread-finish.c	Tue May 13 05:18:56 2008 +0300
@@ -539,7 +539,7 @@
 static int send_roots(struct thread_finish_context *ctx)
 {
 	const struct mail_thread_root_node *roots;
-	unsigned int i, count, child_count;
+	unsigned int i, count;
 	string_t *str;
 	int ret = 0;
 
@@ -547,29 +547,11 @@
 	str_append(str, "* THREAD ");
 
 	roots = array_get(&ctx->roots, &count);
-	/* see if we have only one child */
-	for (i = 0, child_count = 0; i < count && child_count < 2; i++) {
-		if (!roots[i].ignore)
-			child_count++;
-	}
-	if (child_count == 1) {
-		for (i = 0; i < count; i++) {
-			if (!roots[i].ignore) {
-				if (!roots[i].dummy)
-					str_append_c(str, '(');
-				ret = send_root(ctx, str, &roots[i]);
-				if (!roots[i].dummy)
-					str_append_c(str, ')');
-				break;
-			}
-		}
-	} else {
-		for (i = 0; i < count && ret == 0; i++) {
-			if (!roots[i].ignore) {
-				str_append_c(str, '(');
-				ret = send_root(ctx, str, &roots[i]);
-				str_append_c(str, ')');
-			}
+	for (i = 0; i < count && ret == 0; i++) {
+		if (!roots[i].ignore) {
+			str_append_c(str, '(');
+			ret = send_root(ctx, str, &roots[i]);
+			str_append_c(str, ')');
 		}
 	}