about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index ee5ba20e..68adbd72 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -662,7 +662,7 @@ sub thread_results {
         no warnings 'once';
         $Mail::Thread::nosubject = $nosubject;
         $th->thread;
-        $th->order(*PublicInbox::Thread::sort_ts);
+        $th->order(*sort_ts);
         $th
 }
 
@@ -747,6 +747,13 @@ sub inline_dump {
         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) <=>