From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9B7682060B for ; Wed, 2 Dec 2015 02:47:59 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] view: consistent links for per-message views Date: Wed, 2 Dec 2015 02:47:59 +0000 Message-Id: <20151202024759.5837-1-e@80x24.org> List-Id: 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(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index a3a955b..d8fb1cb 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 = { -- EW