X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fthread.cc;fp=lib%2Fthread.cc;h=b599a97d445ec1cd5a5efbe647f85ae2f95efb8a;hp=e961c76bf37a8d3cbee2a4041da48ef92340b03a;hb=9b568e73e1afc211306d18dac3d27df4a07a0fdd;hpb=ccb52edb4c9fecd65a5a2577b6d1e96c4b8de492 diff --git a/lib/thread.cc b/lib/thread.cc index e961c76b..b599a97d 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -429,6 +429,12 @@ _resolve_thread_relationships (notmuch_thread_t *thread) _notmuch_message_list_add_message (thread->toplevel_list, message); } + /* XXX this could be made conditional on messages being inserted + * (out of order) in later passes + */ + thread->toplevel_list = _notmuch_message_sort_subtrees (thread, thread->toplevel_list); + + /* XXX: After scanning through the entire list looking for parents * via "In-Reply-To", we should do a second pass that looks at the * list of messages IDs in the "References" header instead. (And