From 05b04bdaedca1b1878e01470c5acd2523846e6ce Mon Sep 17 00:00:00 2001 From: djcb Date: Thu, 27 Dec 2012 12:07:43 +0200 Subject: [PATCH] * mu-msg-iter.cc: don't skip dups on when threading (due to sorting, we do not know if the same message are 'dup' or 'original' in the final results, so we need to calculate threading info for both) --- lib/mu-msg-iter.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/mu-msg-iter.cc b/lib/mu-msg-iter.cc index 1caddb87..1eb7ca46 100644 --- a/lib/mu-msg-iter.cc +++ b/lib/mu-msg-iter.cc @@ -71,13 +71,17 @@ public: if (threads) { _matches.fetch(); _cursor = _matches.begin(); + _skip_dups = FALSE; _thread_hash = mu_threader_calculate (this, _matches.size(), sortfield, descending); + _skip_dups = + (flags & MU_MSG_ITER_FLAG_SKIP_DUPS); ThreadKeyMaker keymaker(_thread_hash); enq.set_sort_by_key (&keymaker, false); _matches = _enq.get_mset (0, maxnum); + } else if (sortfield != MU_MSG_FIELD_ID_NONE) { enq.set_sort_by_value ((Xapian::valueno)sortfield, descending);