sub thread_results {
my ($msgs) = @_;
- require PublicInbox::Thread;
- my $th = PublicInbox::Thread->new(@$msgs);
+ require PublicInbox::SearchThread;
+ my $th = PublicInbox::SearchThread->new($msgs);
$th->thread;
$th->order(*sort_ts);
$th
}
sub sort_ts {
- sort {
+ [ sort {
(eval { $a->topmost->message->header('X-PI-TS') } || 0) <=>
(eval { $b->topmost->message->header('X-PI-TS') } || 0)
- } @_;
+ } @{$_[0]} ];
}
sub _tryload_ghost ($$) {