]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
view: display small and invalid time ranges
authorEric Wong <e@80x24.org>
Mon, 15 Sep 2025 21:18:15 +0000 (21:18 +0000)
committerEric Wong <e@80x24.org>
Wed, 17 Sep 2025 21:37:27 +0000 (21:37 +0000)
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 <leah@vuxu.org>
Link: https://public-inbox.org/meta/87zfbbpwhu.fsf@vuxu.org/
lib/PublicInbox/View.pm

index 21cee63a791f1765807577bede7e86e02b2d37fc..91b3908adb1a850dac4f4ea689283959887e5ddf 100644 (file)
@@ -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) {