summaryrefslogtreecommitdiff
path: root/query.cc
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-10-29 17:31:07 -0700
committerCarl Worth <cworth@cworth.org>2009-10-29 17:31:07 -0700
commitc771eaf362edb021888d114989d38d8fb2b4cfb3 (patch)
treeba5a02ac5a84560733b5e31d3b633b8d256bb382 /query.cc
parent41c7ad2c91e56bfc0b2fefa0be303605d34f4042 (diff)
notmuch search: Add (relative) date to search output
The new function for formatting relative dates is nice enough that we need to start using it more places. Here's one of them.
Diffstat (limited to 'query.cc')
-rw-r--r--query.cc16
1 files changed, 1 insertions, 15 deletions
diff --git a/query.cc b/query.cc
index 170ab75..2fe3965 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_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);
}
- 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);
}