X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=query.cc;h=2fe3965f64549f3beb1fe42b6f585f492c82a09d;hp=c8a9149118b7793bfff7e2525a37e8bf4f29bdb0;hb=c771eaf362edb021888d114989d38d8fb2b4cfb3;hpb=94f01d9de914b609e1f02385092b82fd61ca73b5 diff --git a/query.cc b/query.cc index c8a91491..2fe3965f 100644 --- a/query.cc +++ b/query.cc @@ -178,8 +178,6 @@ notmuch_query_search_threads (notmuch_query_t *query) const char *thread_id; notmuch_message_results_t *message_results; notmuch_message_t *message; - notmuch_tags_t *tags; - const char *tag; GHashTable *seen; thread_results = talloc (query, notmuch_thread_results_t); @@ -215,13 +213,9 @@ notmuch_query_search_threads (notmuch_query_t *query) g_ptr_array_add (thread_results->threads, thread); } - for (tags = notmuch_message_get_tags (message); - notmuch_tags_has_more (tags); - notmuch_tags_advance (tags)) - { - tag = notmuch_tags_get (tags); - _notmuch_thread_add_tag (thread, tag); - } + _notmuch_thread_add_message (thread, message); + + notmuch_message_destroy (message); } g_hash_table_unref (seen);