lib/PublicInbox/Thread.pm | 7 ------- lib/PublicInbox/View.pm | 9 ++++++++- diff --git a/lib/PublicInbox/Thread.pm b/lib/PublicInbox/Thread.pm index a3dedf541cb592a0e23182ac5c7dbd91736d49ca..781fffff2d5806d05390b66288c413a011745590 100644 --- a/lib/PublicInbox/Thread.pm +++ b/lib/PublicInbox/Thread.pm @@ -17,13 +17,6 @@ if ($Mail::Thread::VERSION <= 2.55) { eval q(sub _container_class { 'PublicInbox::Thread::Container' }); } -sub sort_ts { - sort { - (eval { $a->topmost->message->header('X-PI-TS') } || 0) <=> - (eval { $b->topmost->message->header('X-PI-TS') } || 0) - } @_; -} - package PublicInbox::Thread::Container; use strict; use warnings; diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index ee5ba20e2a91e7b15dfd1ae6e3243fad167ba294..68adbd72840592dccb87cc1e37c151eb4b4795c9 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -662,7 +662,7 @@ my $th = PublicInbox::Thread->new(@$msgs); no warnings 'once'; $Mail::Thread::nosubject = $nosubject; $th->thread; - $th->order(*PublicInbox::Thread::sort_ts); + $th->order(*sort_ts); $th } @@ -745,6 +745,13 @@ "$html>]\n"; } inline_dump($dst, $state, $upfx, $node->child, $level+1); inline_dump($dst, $state, $upfx, $node->next, $level); +} + +sub sort_ts { + sort { + (eval { $a->topmost->message->header('X-PI-TS') } || 0) <=> + (eval { $b->topmost->message->header('X-PI-TS') } || 0) + } @_; } sub rsort_ts {