From 5abb90d6872d320475d8b4d7181c36e9f1906719 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 2 Dec 2015 02:47:00 +0000 Subject: 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. --- lib/PublicInbox/View.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') 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 = { -- cgit v1.2.3-24-ge0c7