This is a display subroutine so it should not be in our thread
monkey-patching package, but instead in the view package.
Hopefully one day in the future, Mail::Thread will be maintained
again and we'll no longer need PublicInbox::Thread at all.
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;
no warnings 'once';
$Mail::Thread::nosubject = $nosubject;
$th->thread;
- $th->order(*PublicInbox::Thread::sort_ts);
+ $th->order(*sort_ts);
$th
}
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 {
sort {
(eval { $b->topmost->message->header('X-PI-TS') } || 0) <=>