From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 91B911FAD8 for ; Sat, 22 Aug 2015 11:41:24 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/6] view: reference total followups Date: Sat, 22 Aug 2015 11:41:21 +0000 Message-Id: <1440243684-2205-3-git-send-email-e@80x24.org> In-Reply-To: <1440243684-2205-1-git-send-email-e@80x24.org> References: <1440243684-2205-1-git-send-email-e@80x24.org> List-Id: In case there's huge threads, readers should know about them even though we currently lack the navigation to display them. --- lib/PublicInbox/View.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 922e8e9..e333906 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -437,7 +437,12 @@ sub html_footer { "threadlink$idx"; my $res = $srch->get_followups($mid); if (my $c = $res->{total}) { - $c = $c == 1 ? '1 followup' : "$c followups"; + my $nr = scalar @{$res->{msgs}}; + if ($nr < $c) { + $c = "$nr of $c followups"; + } else { + $c = $c == 1 ? '1 followup' : "$c followups"; + } $idx .= "\n$c:\n"; $res->{srch} = $srch; thread_followups(\$idx, $mime, $res); -- EW