lib/PublicInbox/View.pm | 8 ++++----
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 4e800c685b7724fa6e76a47b55d8af280b1aa4c4..ea313644979a835350ff022dad5f946ab19722d5 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -85,7 +85,7 @@
$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 @@ if ($srch) {
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 @@
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;
}