diff options
| author | David Bremner <david@tethera.net> | 2018-08-30 08:29:04 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2018-09-06 08:07:12 -0300 |
| commit | 9b568e73e1afc211306d18dac3d27df4a07a0fdd (patch) | |
| tree | 6aa0051c84141d2d1465e4bccd4a5672218697a5 /lib/thread.cc | |
| parent | ccb52edb4c9fecd65a5a2577b6d1e96c4b8de492 (diff) | |
lib/thread: sort sibling messages by date
For non-root messages, this should not should anything currently, as
the messages are already added in date order. In the future we will
add some non-root messages in a second pass out of order and the
sorting will be useful. It does fix the order of multiple
root-messages (although it is overkill for that).
Diffstat (limited to 'lib/thread.cc')
| -rw-r--r-- | lib/thread.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
