X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=query.cc;h=5fac024e7a23be7f17d2d5eed4852b48445e27b4;hp=c8a9149118b7793bfff7e2525a37e8bf4f29bdb0;hb=c12823648ee84b4748e0e9f0cd97f7264911b589;hpb=8e96a87fff4d34a154d1456e9ad47e7b0c322d54 diff --git a/query.cc b/query.cc index c8a91491..5fac024e 100644 --- a/query.cc +++ b/query.cc @@ -207,9 +207,15 @@ notmuch_query_search_threads (notmuch_query_t *query) thread_id, NULL, (void **) &thread)) { + const char *subject; + thread = _notmuch_thread_create (query, query->notmuch, thread_id); + subject = _notmuch_message_get_subject (message); + + _notmuch_thread_set_subject (thread, subject); + g_hash_table_insert (seen, xstrdup (thread_id), thread); g_ptr_array_add (thread_results->threads, thread); @@ -222,6 +228,8 @@ notmuch_query_search_threads (notmuch_query_t *query) tag = notmuch_tags_get (tags); _notmuch_thread_add_tag (thread, tag); } + + notmuch_message_destroy (message); } g_hash_table_unref (seen);