From ae3deb179b7faafd0ece3c24d84c82a1d38bb3c1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 22 Aug 2015 11:41:21 +0000 Subject: [PATCH] view: reference total followups 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 922e8e93..e3339066 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); -- 2.50.0