lib/PublicInbox/View.pm | 6 ++++-- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 5a312d84ba8d14e45cee9fac410440736aefca47..3b041aab2ae64f0957724ae2e7344209c7573cf6 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -879,14 +879,16 @@ } sub dump_topics { my ($ctx) = @_; - my $order = $ctx->{order}; # [ ts, subj1, subj2, subj3, ... ] + my $order = delete $ctx->{order}; # [ ts, subj1, subj2, subj3, ... ] if (!@$order) { $ctx->{-html_tip} = '
[No topics in range]'; return 404; } my @out; - foreach my $topic (@$order) { + + # sort by recency, this allows new posts to "bump" old topics... + foreach my $topic (sort { $b->[0] <=> $a->[0] } @$order) { my ($ts, $n, $seen, $top, @ex) = @$topic; @$topic = (); next unless defined $top; # ghost topic