* [PATCH] view: remove "threadlink" name in per-message view
@ 2015-08-30 1:48 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-08-30 1:48 UTC (permalink / raw)
To: meta
It's a strange word and I'm not quite comfortable with it
in a message view. Instead, use a descriptive link for
the thread headers.
---
lib/PublicInbox/View.pm | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 660447d..7cac785 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -390,12 +390,14 @@ sub thread_inline {
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 },
@@ -473,11 +475,6 @@ sub html_footer {
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);
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-30 1:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-30 1:48 [PATCH] view: remove "threadlink" name in per-message view Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).