* [PATCH 2/4] view: use header_obj to avoid extra method calls
2015-09-13 23:35 5% [PATCH 0/4] minor navigation tweaks Eric Wong
@ 2015-09-13 23:35 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-09-13 23:35 UTC (permalink / raw)
To: meta
Email::MIME will call the header_obj each time anyways, avoid
the extra method lookups and hit header_obj directly for the
header lookup.
---
lib/PublicInbox/View.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 6cb340b..2cda691 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -410,7 +410,7 @@ sub headers_to_html_header {
my $mid = $header_obj->header('Message-ID');
$mid = PublicInbox::Hval->new_msgid($mid);
foreach my $h (qw(From To Cc Subject Date)) {
- my $v = $mime->header($h);
+ my $v = $header_obj->header($h);
defined($v) && ($v ne '') or next;
$v = PublicInbox::Hval->new_oneline($v);
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] minor navigation tweaks
@ 2015-09-13 23:35 5% Eric Wong
2015-09-13 23:35 7% ` [PATCH 2/4] view: use header_obj to avoid extra method calls Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-09-13 23:35 UTC (permalink / raw)
To: meta
A few navigation tweaks to hopefully improve per-message and
per-thread views.
Eric Wong (4):
view: extra Atom feed link in standalone message view
view: use header_obj to avoid extra method calls
view: do not show References unless a message has them
view: jump to anchor of current message on References
lib/PublicInbox/View.pm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-13 23:35 5% [PATCH 0/4] minor navigation tweaks Eric Wong
2015-09-13 23:35 7% ` [PATCH 2/4] view: use header_obj to avoid extra method calls 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).