From: Eric Wong Date: Mon, 15 Sep 2025 21:18:15 +0000 (+0000) Subject: view: display small and invalid time ranges X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae9422a30ff23da33f4454c6ba1279fb0193fe71;p=thirdparty%2Fpublic-inbox.git view: display small and invalid time ranges Instead of falling back to displaying the most recent messages when there are too few (<200) or no messages in a time range, show the small subset or return a 404 when there's no messages at all. This ought to be less confusing for users who want to focus on a small subset of messages within a given timeframe. Reported-by: Leah Neukirchen Link: https://public-inbox.org/meta/87zfbbpwhu.fsf@vuxu.org/ --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 21cee63a7..91b3908ad 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1272,10 +1272,6 @@ sub paginate_recent ($$) { $t =~ /\A([0-9]{8,14})\z/ and $before = str2ts($1); my $msgs = $ctx->{ibx}->over->recent($opts, $after, $before); - if (defined($after) && scalar(@$msgs) < $lim) { - $after = $before = undef; - $msgs = $ctx->{ibx}->over->recent($opts); - } my $more = scalar(@$msgs) == $lim; my ($newest, $oldest); if (@$msgs) {