X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fquery.cc;h=7c1df90c39cce262246b1930f913f90e57a34f46;hb=8561c7463a5de3bd0990d8244abb1c67ca4f4a7d;hp=381529b538c270695144d4aef8ae7ba673dee996;hpb=bbf4b8e4aec69b5684587b77bd0af743afd61eb1;p=notmuch diff --git a/lib/query.cc b/lib/query.cc index 381529b5..7c1df90c 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -61,7 +61,7 @@ notmuch_query_create (notmuch_database_t *notmuch, query->query_string = talloc_strdup (query, query_string); - query->sort = NOTMUCH_SORT_DATE_OLDEST_FIRST; + query->sort = NOTMUCH_SORT_DATE; return query; } @@ -123,10 +123,10 @@ notmuch_query_search_messages (notmuch_query_t *query, } switch (query->sort) { - case NOTMUCH_SORT_DATE_OLDEST_FIRST: + case NOTMUCH_SORT_DATE: enquire.set_sort_by_value (NOTMUCH_VALUE_TIMESTAMP, FALSE); break; - case NOTMUCH_SORT_DATE_NEWEST_FIRST: + case NOTMUCH_SORT_DATE_REVERSE: enquire.set_sort_by_value (NOTMUCH_VALUE_TIMESTAMP, TRUE); break; case NOTMUCH_SORT_MESSAGE_ID: @@ -220,7 +220,8 @@ notmuch_query_search_threads (notmuch_query_t *query, { if (threads_seen >= first) { thread = _notmuch_thread_create (query, query->notmuch, - thread_id); + thread_id, + query->query_string); g_ptr_array_add (threads->threads, thread); } else { thread = NULL; @@ -231,9 +232,6 @@ notmuch_query_search_threads (notmuch_query_t *query, threads_seen++; } - if (thread) - _notmuch_thread_add_message (thread, message); - notmuch_message_destroy (message); messages_seen++;