about summary refs log tree commit homepage
path: root/lib/PublicInbox/Mbox.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-07 03:41:47 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-07 03:42:20 +0000
commit6f4fcc32237e46fb219df9ad4e92aeb3a170d03f (patch)
treefd4473799e267f7e4b0f2eda05657f5b99b6c78a /lib/PublicInbox/Mbox.pm
parentaed636420b2fee7ff217bfae148cc9485b011d79 (diff)
downloadpublic-inbox-6f4fcc32237e46fb219df9ad4e92aeb3a170d03f.tar.gz
We only need to call get_thread beyond 1000 messages for
fetching entire mboxes.  It's probably too much for the HTML
display otherwise.
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r--lib/PublicInbox/Mbox.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm
index 4427ae5d..11b23022 100644
--- a/lib/PublicInbox/Mbox.pm
+++ b/lib/PublicInbox/Mbox.pm
@@ -130,9 +130,9 @@ sub thread_mbox {
         eval { require IO::Compress::Gzip };
         return sub { need_gzip(@_) } if $@;
         my $mid = $ctx->{mid};
-        my $msgs = $srch->get_thread($mid, 0);
+        my $msgs = $srch->get_thread($mid, {});
         return [404, [qw(Content-Type text/plain)], []] if !@$msgs;
-        my $prev = $msgs->[-1]->{num};
+        my $prev = $msgs->[-1];
         my $i = 0;
         my $cb = sub {
                 while (1) {
@@ -142,7 +142,7 @@ sub thread_mbox {
                         # refill result set
                         $msgs = $srch->get_thread($mid, $prev);
                         return unless @$msgs;
-                        $prev = $msgs->[-1]->{num};
+                        $prev = $msgs->[-1];
                         $i = 0;
                 }
         };