X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=query.cc;h=2fe3965f64549f3beb1fe42b6f585f492c82a09d;hp=5fac024e7a23be7f17d2d5eed4852b48445e27b4;hb=f365024166a9a2f702fa16add5fe02a20283a516;hpb=c12823648ee84b4748e0e9f0cd97f7264911b589 diff --git a/query.cc b/query.cc index 5fac024e..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); @@ -207,27 +205,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); } - 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); }