]> Sergey Matveev's repositories - public-inbox.git/commitdiff
www: use <hr> to delimit messages in /new.html view, too
authorEric Wong <e@80x24.org>
Sat, 6 Aug 2016 21:00:40 +0000 (21:00 +0000)
committerEric Wong <e@80x24.org>
Sat, 6 Aug 2016 21:03:22 +0000 (21:03 +0000)
This is necessary to delimit messages when viewed without
threading.

lib/PublicInbox/Feed.pm
lib/PublicInbox/View.pm

index a697a4326fcaefcb64f2be0a17432f71cd1a2163..240c336f72d96e7ef1714e5fd57cf4c7d8e673d4 100644 (file)
@@ -59,12 +59,12 @@ sub new_html {
        }
        $ctx->{-html_tip} = '<pre>';
        $ctx->{-upfx} = '';
+       $ctx->{-hr} = 1;
        PublicInbox::WwwStream->response($ctx, 200, sub {
                while (my $path = shift @paths) {
                        my $m = do_cat_mail($ctx->{-inbox}, $path) or next;
                        my $more = scalar @paths;
                        my $s = PublicInbox::View::index_entry($m, $ctx, $more);
-                       $s .= '</pre>' unless $more;
                        return $s;
                }
                new_html_footer($ctx, $last);
index d6711d5c257d06bb03869b7212c1a1b71d4655fa..ed3c96e80d6ec5297abbae0d1c523e515a42963d 100644 (file)
@@ -182,6 +182,8 @@ sub index_entry {
                $rv .= "\t[<a\nhref=\"${mhref}T/#u\">$flat</a>";
                $rv .= "|<a\nhref=\"${mhref}t/#u\">$threaded</a>]";
                $rv .= " <a\nhref=#r$id>$ctx->{s_nr}</a>";
+       } else {
+               $hr = $ctx->{-hr};
        }
 
        $rv .= $more ? '</pre><hr><pre>' : '</pre>' if $hr;