my $path = $root_anchor ? '../../' : '';
my $href = $mid->as_href;
my $irt = $header_obj->header('In-Reply-To');
- my ($anchor_idx, $anchor, $t_anchor);
+ my ($anchor_idx, $anchor);
if (defined $irt) {
$anchor_idx = anchor_for($irt);
$anchor = $seen->{$anchor_idx};
- $t_anchor = T_ANCHOR;
- } else {
- $t_anchor = '';
}
if ($srch) {
$subj = "<a\nhref=\"${path}t/$href/#u\">$subj</a>";
$rv .= " <a\nhref=\"$anchor\">parent</a>";
}
- if ($srch) {
- $rv .= " <a\nhref=\"${path}t/$href/$t_anchor\">" .
- "threadlink</a>";
- }
-
$fh->write($rv .= '</pre></td></tr></table>');
}
my $mid = mid_compress(mid_clean($cur->header('Message-ID')));
my $res = $srch->get_thread($mid);
my $nr = $res->{total};
+
if ($nr <= 1) {
- $$dst .= "[only message in thread]\n";
+ $$dst .= "\n[no followups, yet]</a>\n";
return;
}
- $$dst .= "roughly $nr messages in thread:\n";
+ $$dst .= "\n\n~$nr messages in thread: ".
+ "(<a\nhref=\"../../t/$mid/#u\">expand</a>)\n";
my $subj = $srch->subject_path($cur->header('Subject'));
my $state = {
seen => { $subj => 1 },
my $srch = $ctx->{srch} if $ctx;
my $idx = $standalone ? " <a\nhref=\"../../\">index</a>" : '';
if ($idx && $srch) {
- $mid = mid_compress(mid_clean($mid));
- my $t_anchor = defined $irt ? T_ANCHOR : '';
- $irt = $mime->header('In-Reply-To');
- $idx = " <a\nhref=\"../../t/$mid/$t_anchor\">".
- "threadlink</a>$idx\n\n";
my $next = thread_inline(\$idx, $ctx, $mime);
if (defined $irt) {
$irt = PublicInbox::Hval->new_msgid($irt);