From: Eric Wong Date: Fri, 4 Sep 2015 08:27:45 +0000 (+0000) Subject: view: thread view expands focused message X-Git-Tag: v1.0.0~910 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=239d316f953260768f36f95006c919e45c0dd8e8;p=public-inbox.git view: thread view expands focused message Non-top-level messages still deserve to be shown in full if they're the message in the URL. --- 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 = "$subj"; } - if ($root_anchor && $root_anchor eq $id) { + if ($root_anchor eq $id) { $subj = "$subj"; } @@ -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; }