]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/View.pm
www: omit [thread overview] link for unindexed v1
[public-inbox.git] / lib / PublicInbox / View.pm
index 11a94ba938636ce28bd8d5373d5e2b3d50c811c6..2b8e220bb2a7f3ca4628a261c49f0efce04b4250 100644 (file)
@@ -717,7 +717,13 @@ sub _msg_page_prepare_obuf {
        for my $v ($eml->header('Date')) {
                $v = ascii_html($v);
                obfuscate_addrs($obfs_ibx, $v) if $obfs_ibx; # possible :P
-               $rv .= qq{Date: $v\t<a\nhref="#r">[thread overview]</a>\n};
+               $rv .= qq{Date: $v\n};
+       }
+       # [thread overview] link is typically added after Date,
+       # but added after Subject, or even nothing.
+       if ($have_over) {
+               chop $rv; # drop "\n", or noop if $rv eq ''
+               $rv .= qq{\t<a\nhref="#r">[thread overview]</a>\n};
        }
        if (!$nr) { # first (and only) message, common case
                $ctx->{-title_html} = join(' - ', @title);