]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
net_reader: process title reflects NNTP article
authorEric Wong <e@80x24.org>
Tue, 3 Oct 2023 06:43:50 +0000 (06:43 +0000)
committerEric Wong <e@80x24.org>
Tue, 3 Oct 2023 10:16:08 +0000 (10:16 +0000)
This matches the IMAP behavior with UIDs.  While we're in the
area, cut down on LoC a bit and reduce the scope of the $art
variable.

lib/PublicInbox/NetReader.pm

index 2d6cb0d6f6a020dfddefafc0b1f6e54347f320f4..76fd3892b73d55365519e3670b7943c56714e986 100644 (file)
@@ -788,14 +788,12 @@ sub _nntp_fetch_all ($$$) {
        $beg = $num_a if defined($num_a) && $num_a > $beg && $num_a <= $end;
        $end = $num_b if defined($num_b) && $num_b >= $beg && $num_b < $end;
        $end = $beg if defined($num_a) && !defined($num_b);
-       my ($err, $art, $last_art, $kw); # kw stays undef, no keywords in NNTP
-       unless ($self->{quiet}) {
-               warn "# $uri fetching ARTICLE $beg..$end\n";
-       }
+       my ($err, $last_art, $kw); # kw stays undef, no keywords in NNTP
+       warn "# $uri fetching ARTICLE $beg..$end\n" if !$self->{quiet};
        my $n = $self->{max_batch};
-       for ($beg..$end) {
+       for my $art ($beg..$end) {
                last if $self->{quit};
-               $art = $_;
+               local $0 = "#$art $group $sec";
                if (--$n < 0) {
                        run_commit_cb($self);
                        $itrk->update_last(0, $last_art) if $itrk;