commit 487f3ddceb144407b60d53a545d08fa03abc65ea from: Omar Polo date: Tue Apr 04 14:51:40 2023 UTC simplify thread_header commit - a3c4c223a6e8f25647c6e13c8769c187cb0946da commit + 487f3ddceb144407b60d53a545d08fa03abc65ea blob - ac26003375ef1b42895589ba2d9debfc3cdde914 blob + de87cd80793dd69cf80340a3502df9d44b9796a4 --- GotMArc.pm +++ GotMArc.pm @@ -91,8 +91,7 @@ sub index_header { } sub thread_header { - my ($fh, $e, $mail, $p, $n, $spoiler) = @_; - $spoiler = 0 unless defined $spoiler; + my ($fh, $e, $mail, $p, $n) = @_; my @entries = @$e; @@ -120,10 +119,13 @@ sub thread_header { say $fh "

Download raw body.

" if defined $encmid; - say $fh "
" if $spoiler; - say $fh "Thread" if $spoiler; - thrslice($fh, $mail, $p, $n) if defined $p and defined $n; - say $fh "
" if $spoiler; + if (defined($p) and defined($n)) { + say $fh "
"; + say $fh "Thread"; + thrslice($fh, $mail, $p, $n); + say $fh "
"; + thrnav($fh, $p, $n, $mail->{mid}, $mail->{tid}); + } say $fh "\n"; } blob - cb957d6415f362e0852864483cbdd7951771957a blob + 293813d8adf16357a78e79ff5905ac46b8c4a235 --- mexp +++ mexp @@ -82,7 +82,7 @@ sub export_one { } say $text ""; - thread_header $fh, \@hdrs, $mail, $prev, $next, 1; + thread_header $fh, \@hdrs, $mail, $prev, $next; print $fh "
";
 	while (<$mshow>) {