X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fthread.cc;fp=lib%2Fthread.cc;h=e17ef63ef48e4657719b0c147835bb86e309f9c0;hb=50340bcb78586dc63b5e0914563665b30e8f88d0;hp=1a1ecfa5507ee8cf35e243eb4b44ddfdcd0526eb;hpb=8a8e2b11c208050aa1d719ec0933f58d51628fdd;p=notmuch diff --git a/lib/thread.cc b/lib/thread.cc index 1a1ecfa5..e17ef63e 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -44,6 +44,7 @@ struct _notmuch_thread { GHashTable *message_hash; int total_messages; + int total_files; int matched_messages; time_t oldest; time_t newest; @@ -266,6 +267,7 @@ _thread_add_message (notmuch_thread_t *thread, _notmuch_message_list_add_message (thread->message_list, talloc_steal (thread, message)); thread->total_messages++; + thread->total_files += notmuch_message_count_files (message); g_hash_table_insert (thread->message_hash, xstrdup (notmuch_message_get_message_id (message)), @@ -495,6 +497,7 @@ _notmuch_thread_create (void *ctx, free, NULL); thread->total_messages = 0; + thread->total_files = 0; thread->matched_messages = 0; thread->oldest = 0; thread->newest = 0; @@ -566,6 +569,12 @@ notmuch_thread_get_total_messages (notmuch_thread_t *thread) return thread->total_messages; } +int +notmuch_thread_get_total_files (notmuch_thread_t *thread) +{ + return thread->total_files; +} + int notmuch_thread_get_matched_messages (notmuch_thread_t *thread) {