RE: [PATCH 4/5] Introduce g:notmuch_rb_folders_count_threads
[notmuch-archives.git] / a4 / 1979f5ca1eeda795a90916bf91fdb8272d7509
1 Return-Path: <felipe.contreras@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 21F56431FAF\r
6         for <notmuch@notmuchmail.org>; Tue,  2 Apr 2013 12:41:30 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id ubg2vWlFWz-r for <notmuch@notmuchmail.org>;\r
17         Tue,  2 Apr 2013 12:41:29 -0700 (PDT)\r
18 Received: from mail-ye0-f182.google.com (mail-ye0-f182.google.com\r
19         [209.85.213.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 9560E431FAE\r
22         for <notmuch@notmuchmail.org>; Tue,  2 Apr 2013 12:41:29 -0700 (PDT)\r
23 Received: by mail-ye0-f182.google.com with SMTP id r5so122602yen.27\r
24         for <notmuch@notmuchmail.org>; Tue, 02 Apr 2013 12:41:29 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=x-received:date:from:to:cc:message-id:in-reply-to:references\r
27         :subject:mime-version:content-type:content-transfer-encoding;\r
28         bh=ZS6d6SBYzVOtiiNffwaFq8cSRrwBjcDa/DP4drivaQQ=;\r
29         b=0/ExunKd1Znnzz4no2Manjm3ldUOWgN/pVj/L+7ZTmfjjYLMvs7hMO9hAAY9f3FlfV\r
30         aEHO4HBNNMK49REbV1giq2x2DGIcnyupUt1Gqc/0ZNs+bV9i3NkNKp2iDONKhlUPsrJ8\r
31         15e/3m7s2fJfThb2Zha+MQrnuZ9gb4okc/fG/79h132dkxd4IMhtsuRTScFWaC7ywXIX\r
32         qAocXIkYSaLE3ROGSEzh9HHy2PHw9JBPHmvbUalRlLV2jFrrV1kx0jCLRiE5wbDChWCA\r
33         NqH53ivg5miZ1toDh/9Z8ARb1Q89X53vNNrDuatbyKVqEZfAcyXDeEv8G3HbtzGnUo5v\r
34         oefA==\r
35 X-Received: by 10.236.86.105 with SMTP id v69mr15936005yhe.17.1364931689125;\r
36         Tue, 02 Apr 2013 12:41:29 -0700 (PDT)\r
37 Received: from localhost (187-163-100-70.static.axtel.net. [187.163.100.70])\r
38         by mx.google.com with ESMTPS id t27sm5003338yhm.20.2013.04.02.12.41.26\r
39         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
40         Tue, 02 Apr 2013 12:41:28 -0700 (PDT)\r
41 Date: Tue, 02 Apr 2013 13:39:45 -0600\r
42 From: Felipe Contreras <felipe.contreras@gmail.com>\r
43 To: "Kirill A. Shutemov" <kirill@shutemov.name>, \r
44         Felipe Contreras <felipe.contreras@gmail.com>\r
45 Message-ID: <515b34012ebf8_146e1045e10937e4@nysa.mail>\r
46 In-Reply-To: <1359388340-27136-5-git-send-email-kirill@shutemov.name>\r
47 References: <1359388340-27136-1-git-send-email-kirill@shutemov.name>\r
48         <1359388340-27136-5-git-send-email-kirill@shutemov.name>\r
49 Subject: RE: [PATCH 4/5] Introduce g:notmuch_rb_folders_count_threads\r
50 Mime-Version: 1.0\r
51 Content-Type: text/plain;\r
52  charset=utf-8\r
53 Content-Transfer-Encoding: 7bit\r
54 Cc: notmuch@notmuchmail.org\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Tue, 02 Apr 2013 19:41:30 -0000\r
68 \r
69 Kirill A. Shutemov wrote:\r
70 > From: "Kirill A. Shutemov" <kirill@shutemov.name>\r
71\r
72 > If the option set, folders list shows count of threads, not messages\r
73 \r
74 >                               folders.each do |name, search|\r
75 >                                       q = db.query(search)\r
76 >                                       $searches << search\r
77 > -                                     b << "%9d %-20s (%s)" % [q.search_messages.count, name, search]\r
78 > +                                     count = count_threads == 0 ?\r
79 > +                                             q.search_messages.count : q.search_threads.count\r
80 \r
81 I prefer:\r
82 count = count_threads ? q.search_threads.count : q.search_messages.count\r
83 \r
84 But other than that looks good to me. Applied.\r
85 \r
86 -- \r
87 Felipe Contreras\r