RE: [PATCH 4/5] Introduce g:notmuch_rb_folders_count_threads

Subject: RE: [PATCH 4/5] Introduce g:notmuch_rb_folders_count_threads

Date: Tue, 02 Apr 2013 13:39:45 -0600

To: Kirill A. Shutemov, Felipe Contreras

Cc: notmuch@notmuchmail.org

From: Felipe Contreras


Kirill A. Shutemov wrote:
> From: "Kirill A. Shutemov" <kirill@shutemov.name>
> 
> If the option set, folders list shows count of threads, not messages

>  				folders.each do |name, search|
>  					q = db.query(search)
>  					$searches << search
> -					b << "%9d %-20s (%s)" % [q.search_messages.count, name, search]
> +					count = count_threads == 0 ?
> +						q.search_messages.count : q.search_threads.count

I prefer:
count = count_threads ? q.search_threads.count : q.search_messages.count

But other than that looks good to me. Applied.

-- 
Felipe Contreras

Thread: