From: Eric Wong <e@80x24.org>
Date: Mon, 21 Apr 2014 09:53:53 +0000 (+0000)
Subject: html/index: do not waste space with non-existent thread roots
X-Git-Tag: v1.0.0~1219
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=87fe634f0fbd6795d2e0f4daf17f13af456212a0;p=public-inbox.git

html/index: do not waste space with non-existent thread roots

Screen real-estate is valuable, and missing roots tend to
be false-positive matches (using Subject, not In-Reply-To
or References).
---

diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 54feaf5b..6658a52b 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -287,8 +287,8 @@ sub add_to_feed {
 
 sub dump_html_line {
 	my ($self, $level, $args) = @_; # args => [ $html, $midurl ]
-	$args->[0] .= (' ' x $level);
 	if ($self->message) {
+		$args->[0] .= (' ' x $level);
 		my $simple = $self->message;
 		my $subj = utf8_header($simple, "Subject");
 		my $mid = utf8_header($simple, "Message-ID");
@@ -302,8 +302,6 @@ sub dump_html_line {
 		$from = xs_html($from);
 		$subj = xs_html($subj);
 		$args->[0] .= "<a href=\"$url.html\">$subj</a> $from\n";
-	} else {
-		$args->[0] .= "[ Message not available ]\n";
 	}
 	dump_html_line($self->child, $level+1, $args) if $self->child;
 	dump_html_line($self->next, $level, $args) if $self->next;