]> git.notmuchmail.org Git - notmuch/blobdiff - query.cc
notmuch show: Initial implementation (headers only)
[notmuch] / query.cc
index c8a9149118b7793bfff7e2525a37e8bf4f29bdb0..170ab7523957de7ba317ea86b311281e4be76981 100644 (file)
--- 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_header (message, "subject");
+
+           _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);