diff options
author | Eric Wong <e@80x24.org> | 2015-09-04 08:27:45 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-04 08:28:45 +0000 |
commit | 239d316f953260768f36f95006c919e45c0dd8e8 (patch) | |
tree | 2ca342a3bf47c1fb0b2a78ceaa96cca5baf01023 /lib | |
parent | 4e36325f723709757f16e28ecf82a21e750ab20d (diff) | |
download | public-inbox-239d316f953260768f36f95006c919e45c0dd8e8.tar.gz |
Non-top-level messages still deserve to be shown in full if they're the message in the URL.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/View.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 4e800c68..ea313644 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -85,7 +85,7 @@ sub index_entry { $from = PublicInbox::Hval->new_oneline($from)->as_html; $subj = PublicInbox::Hval->new_oneline($subj)->as_html; my $more = 'permalink'; - my $root_anchor = $state->{root_anchor}; + my $root_anchor = $state->{root_anchor} || ''; my $path = $root_anchor ? '../../' : ''; my $href = $mid->as_href; my $irt = in_reply_to($header_obj); @@ -95,7 +95,7 @@ sub index_entry { my $t = $ctx->{flat} ? 'T' : 't'; $subj = "<a\nhref=\"${path}$href/$t/#u\">$subj</a>"; } - if ($root_anchor && $root_anchor eq $id) { + if ($root_anchor eq $id) { $subj = "<u\nid=\"u\">$subj</u>"; } @@ -116,8 +116,8 @@ sub index_entry { my ($fhref, $more_ref); my $mhref = "${path}$href/"; - # show full messages at level == 0 in threaded view - if ($level > 0 || ($ctx->{flat} && $root_anchor ne $id)) { + # show full message if it's our root message + if ($root_anchor ne $id) { $fhref = "${path}$href/f/"; $more_ref = \$more; } |