From bb23f834ec0510d5318e59620100b0046f044f34 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 3 Feb 2018 02:50:46 +0000 Subject: view: allow expanding directly to "nested" view Sometimes, it can be desirable to jump directly to the "nested" view when viewing a thread skeleton. This makes it possible. While we're at it, shorten some of the text to ensure it still fits in 80 columns. --- lib/PublicInbox/View.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 0de53cb2..65d7d019 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -576,26 +576,27 @@ sub thread_skel { my $mid = mid_clean($hdr->header_raw('Message-ID')); my $sres = $srch->get_thread($mid); my $nr = $sres->{total}; - my $expand = qq(expand ) . - qq(/ mbox.gz ) . - qq(/ Atom feed); + my $expand = qq(expand[flat) . + qq(|nested] ) . + qq(mbox.gz ) . + qq(Atom feed); my $parent = in_reply_to($hdr); $$dst .= "\nThread overview: "; if ($nr <= 1) { if (defined $parent) { - $$dst .= "($expand)\n "; + $$dst .= "$expand\n "; $$dst .= ghost_parent("$tpfx../", $parent) . "\n"; } else { - $$dst .= "[no followups, yet] ($expand)\n"; + $$dst .= "[no followups] $expand\n"; } $ctx->{next_msg} = undef; $ctx->{parent_msg} = $parent; return; } - $$dst .= "$nr+ messages in thread ($expand"; - $$dst .= qq! / [top])\n!; + $$dst .= "$nr+ messages / $expand"; + $$dst .= qq! top\n!; my $subj = $hdr->header('Subject'); defined $subj or $subj = ''; -- cgit v1.2.3-24-ge0c7