]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: shorter link for ghosts in per-message view
authorEric Wong <e@80x24.org>
Wed, 6 Apr 2016 07:37:46 +0000 (07:37 +0000)
committerEric Wong <e@80x24.org>
Wed, 6 Apr 2016 07:38:24 +0000 (07:38 +0000)
Shorten lines used for long Message-IDs in the
inline thread view for per-message views for readability.

lib/PublicInbox/View.pm

index 5f9ecd108aacf444b1ad07a46bfd2b356865ecf8..c25c5d575f54f27264e48c7d28579cd8d2443598 100644 (file)
@@ -820,10 +820,12 @@ sub inline_dump {
                _inline_header($dst, $state, $upfx, $hdr, $level);
        } else {
                my $dot = $level == 0 ? '' : '` ';
-               my $pfx = (' ' x length(' 1970-01-01 13:37 ')).
-                       indent_for($level) . $dot;
+               my $pfx = '      [not found] ' .  indent_for($level) . $dot;
                $$dst .= $pfx;
-               $$dst .= ghost_parent("$upfx../", $node->messageid) . "\n";
+               my $mid = PublicInbox::Hval->new_msgid($node->messageid);
+               my $href = $mid->as_href;
+               my $html = $mid->as_html;
+               $$dst .= qq{&lt;<a\nhref="$upfx../$href/">$html</a>&gt;\n};
        }
        inline_dump($dst, $state, $upfx, $node->child, $level+1);
        inline_dump($dst, $state, $upfx, $node->next, $level);