* [PATCH 7/9] view: thread view expands focused message
@ 2015-09-04 8:58 7% ` Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2015-09-04 8:58 UTC (permalink / raw)
To: meta
Non-top-level messages still deserve to be shown in full
if they're the message in the URL.
---
lib/PublicInbox/View.pm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 4e800c6..ea31364 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -85,7 +85,7 @@ sub index_entry {
$from = PublicInbox::Hval->new_oneline($from)->as_html;
$subj = PublicInbox::Hval->new_oneline($subj)->as_html;
my $more = 'permalink';
- my $root_anchor = $state->{root_anchor};
+ my $root_anchor = $state->{root_anchor} || '';
my $path = $root_anchor ? '../../' : '';
my $href = $mid->as_href;
my $irt = in_reply_to($header_obj);
@@ -95,7 +95,7 @@ sub index_entry {
my $t = $ctx->{flat} ? 'T' : 't';
$subj = "<a\nhref=\"${path}$href/$t/#u\">$subj</a>";
}
- if ($root_anchor && $root_anchor eq $id) {
+ if ($root_anchor eq $id) {
$subj = "<u\nid=\"u\">$subj</u>";
}
@@ -116,8 +116,8 @@ sub index_entry {
my ($fhref, $more_ref);
my $mhref = "${path}$href/";
- # show full messages at level == 0 in threaded view
- if ($level > 0 || ($ctx->{flat} && $root_anchor ne $id)) {
+ # show full message if it's our root message
+ if ($root_anchor ne $id) {
$fhref = "${path}$href/f/";
$more_ref = \$more;
}
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-04 8:58 [PATCH 0/9] another round of updates Eric Wong
2015-09-04 8:58 7% ` [PATCH 7/9] view: thread view expands focused message Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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).