]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: reference total followups
authorEric Wong <e@80x24.org>
Sat, 22 Aug 2015 11:41:21 +0000 (11:41 +0000)
committerEric Wong <e@80x24.org>
Sat, 22 Aug 2015 11:42:35 +0000 (11:42 +0000)
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

index 922e8e938e372172e308af31fe5f0a7b308b92ed..e3339066e27d7303440c18905219d12ca3717114 100644 (file)
@@ -437,7 +437,12 @@ sub html_footer {
                       "threadlink</a>$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);