about summary refs log tree commit homepage
path: root/lib/PublicInbox/Mbox.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r--lib/PublicInbox/Mbox.pm11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm
index 0be19685..c66ccaa7 100644
--- a/lib/PublicInbox/Mbox.pm
+++ b/lib/PublicInbox/Mbox.pm
@@ -166,14 +166,7 @@ sub mbox_all {
         return sub { need_gzip(@_) } if $@;
         if ($query eq '') {
                 my $prev = 0;
-                my $msgs = [];
-                my $cb = sub {
-                        $ctx->{-inbox}->mm->id_batch($prev, sub {
-                                $msgs = $_[0];
-                        });
-                        $prev = $msgs->[-1] if @$msgs;
-                        $msgs;
-                };
+                my $cb = sub { $ctx->{-inbox}->mm->ids_after(\$prev) };
                 return PublicInbox::MboxGz->response($ctx, $cb, 'all');
         }
         my $opts = { offset => 0 };
@@ -244,7 +237,7 @@ sub getline {
         do {
                 # work on existing result set
                 while (defined(my $smsg = shift @$msgs)) {
-                        # id_batch may return integers
+                        # ids_after may return integers
                         ref($smsg) or
                                 $smsg = $ctx->{srch}->{over_ro}->get_art($smsg);