From 9c2c60326ba22355ab23dc0b261d63beb1c9097a Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 12 Nov 2001 09:53:54 +0000 Subject: [PATCH] patch-1.3.23.2-de-new_threads.2 --- sort.c | 13 ++++++++----- thread.c | 3 --- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sort.c b/sort.c index 2792da2b7..4043b0b78 100644 --- a/sort.c +++ b/sort.c @@ -207,6 +207,14 @@ void mutt_sort_headers (CONTEXT *ctx, int init) } unset_option (OPTNEEDRESCORE); + if (option (OPTRESORTINIT)) + { + unset_option (OPTRESORTINIT); + init = 1; + } + + if (init && ctx->tree) + mutt_clear_threads (ctx); if ((Sort & SORT_MASK) == SORT_THREADS) { @@ -222,11 +230,6 @@ void mutt_sort_headers (CONTEXT *ctx, int init) Sort = i; unset_option (OPTSORTSUBTHREADS); } - if (option (OPTRESORTINIT)) - { - unset_option (OPTRESORTINIT); - init = 1; - } mutt_sort_threads (ctx, init); } else if ((sortfunc = mutt_get_sort_func (Sort)) == NULL || diff --git a/thread.c b/thread.c index e6df19ad7..f0392853d 100644 --- a/thread.c +++ b/thread.c @@ -655,10 +655,7 @@ void mutt_sort_threads (CONTEXT *ctx, int init) init = 1; if (init) - { - mutt_clear_threads (ctx); ctx->thread_hash = hash_create (ctx->msgcount * 2); - } /* we want a quick way to see if things are actually attached to the top of the * thread tree or if they're just dangling, so we attach everything to a top -- 2.40.0