]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/View.pm
searchview: deal with the removal of rsort
[public-inbox.git] / lib / PublicInbox / View.pm
index f58099d4b384ada646b79928bfb9dd854fdac565..ebe82b49fdddc1ca8551e3706e1c28a92a6504ad 100644 (file)
@@ -726,7 +726,7 @@ sub msg_timestamp {
 }
 
 sub thread_results {
-       my ($msgs, $nosubject) = @_;
+       my ($msgs, $nosubject, $nosort) = @_;
        require PublicInbox::Thread;
        my $th = PublicInbox::Thread->new(@$msgs);
 
@@ -740,7 +740,7 @@ sub thread_results {
        # Keep ghosts with only a single direct child:
        $Mail::Thread::noprune = 1;
        $th->thread;
-       $th->order(*sort_ts);
+       $th->order(*sort_ts) unless $nosort;
        $th
 }