]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: do not show References unless a message has them
authorEric Wong <e@80x24.org>
Sun, 13 Sep 2015 23:29:54 +0000 (23:29 +0000)
committerEric Wong <e@80x24.org>
Sun, 13 Sep 2015 23:29:54 +0000 (23:29 +0000)
It's a waste of space and potentially confusing.

lib/PublicInbox/View.pm

index 2cda691c99d42fb7ffefd51e76baa9ea1aeb6d80..aaab3b2a122450b83e26bc1dbdde622c4c75d4d8 100644 (file)
@@ -434,7 +434,12 @@ sub headers_to_html_header {
        $rv .= "(<a\nhref=\"${upfx}raw\">raw</a>)\n";
        my $atom;
        if ($srch) {
-               $rv .= "<a\nhref=\"${upfx}t/\">References: [expand]</a>\n";
+               if ($header_obj->header('In-Reply-To') ||
+                   $header_obj->header('References')) {
+                       $rv .= "<a\nhref=\"${upfx}t/\">" .
+                               "References: [expand]</a>\n";
+               }
+
                $atom = qq{<link\nrel=alternate\ntitle="Atom feed"\n} .
                        qq!href="${upfx}t.atom"\ntype="application/atom+xml"/>!;
        } else {