lib/PublicInbox/Feed.pm | 2 +- lib/PublicInbox/View.pm | 7 +++---- diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 5cb044bdc7c18daf69712ca004dca9b14401ab6e..d7df07ee9c4577a1d15fe5410f68e6bdd68ee3e2 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -95,7 +95,7 @@ if ($v > 2) { die "BUG: unsupported inbox version: $v\n"; } if (my $srch = $ibx->search) { - return PublicInbox::View::paginate_recent($ctx); + return PublicInbox::View::paginate_recent($ctx, $max); } my $hex = '[a-f0-9]'; diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 94058ed09ecd8039c678e271ace689a3b131f44d..af287b96852be66b708bd0eff86d6064ee1773c6 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1049,10 +1049,9 @@ my (undef, $ctx) = @_; pagination_footer($ctx, '.') } -sub paginate_recent ($) { - my ($ctx) = @_; +sub paginate_recent ($$) { + my ($ctx, $lim) = @_; my $t = $ctx->{qp}->{t} || ''; - my $lim = 200; # this is our window my $opts = { limit => $lim }; my ($after, $before); @@ -1094,7 +1093,7 @@ } sub index_topics { my ($ctx) = @_; - my $msgs = paginate_recent($ctx); + my $msgs = paginate_recent($ctx, 200); # 200 is our window if (@$msgs) { walk_thread(thread_results($ctx, $msgs), $ctx, *acc_topic); }