From: Eric Wong Date: Wed, 2 Dec 2015 02:47:00 +0000 (+0000) Subject: view: consistent links for per-message views X-Git-Tag: v1.0.0~781 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=5abb90d6872d320475d8b4d7181c36e9f1906719 view: consistent links for per-message views Just because a message is currently alone does not mean the links won't be valid in the future when more messages show up. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index a3a955b2..d8fb1cb5 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -463,15 +463,17 @@ sub thread_inline { my $mid = mid_clean($cur->header('Message-ID')); my $res = $srch->get_thread($mid); my $nr = $res->{total}; + my $upfx = $full_pfx ? '' : '../'; + my $expand = "(expand " . + "/ mbox.gz)"; if ($nr <= 1) { - $$dst .= "\n[no followups, yet]\n"; + $$dst .= "\n[no followups, yet] $expand\n"; return (undef, in_reply_to($cur)); } - my $upfx = $full_pfx ? '' : '../'; - $$dst .= "\n\n~$nr messages in thread: ". - "(expand)\n"; + $$dst .= "\n\n~$nr messages in thread: $expand\n"; + my $subj = $srch->subject_path($cur->header('Subject')); my $parent = in_reply_to($cur); my $state = {