From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1E00A20FD9 for ; Thu, 30 Jun 2016 09:21:49 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 11/13] view: show thread size when linking to summary Date: Thu, 30 Jun 2016 09:21:41 +0000 Message-Id: <20160630092143.31651-12-e@80x24.org> In-Reply-To: <20160630092143.31651-1-e@80x24.org> References: <20160630092143.31651-1-e@80x24.org> List-Id: This should give readers a better idea of what to expect. --- lib/PublicInbox/View.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 22d7250..fac53eb 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -156,7 +156,7 @@ sub index_entry { } $rv .= " / [$flat"; $rv .= "|$threaded]"; - $rv .= " / thread overview"; + $rv .= " / $ctx->{s_nr}"; } $rv .= $more ? "\n\n" : "\n"; @@ -226,7 +226,8 @@ sub _th_index_lite { $rv .= $pad . $mapping->{$nn->messageid}->[1]; } } - $rv .= "_ $s_s, $s_c\n"; + $rv .= "_ "; + $rv .= "$s_s, $s_c; $ctx->{s_nr}\n"; } sub walk_thread { @@ -319,6 +320,7 @@ sub thread_html { $ctx->{root_anchor} = anchor_for($mid); $ctx->{seen} = {}; $ctx->{mapping} = {}; + $ctx->{s_nr} = "$nr+ messages in thread"; my $th = thread_results($msgs); walk_thread($th, $ctx, *pre_thread); -- EW