From 16d1d110117a2521fcc3304541c937385febd66b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 2 May 2016 03:20:22 +0000 Subject: view: disable subject threading Broken threads should be exposed to hopefully encourage people to use proper mail clients which set In-Reply-To headers. --- lib/PublicInbox/View.pm | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 63810dcb..70eb44e5 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -670,21 +670,11 @@ sub msg_timestamp { } sub thread_results { - my ($msgs, $nosubject, $nosort) = @_; + my ($msgs) = @_; require PublicInbox::Thread; my $th = PublicInbox::Thread->new(@$msgs); - - # WARNING! both these Mail::Thread knobs were found by inspecting - # the Mail::Thread 2.55 source code, and we have some monkey patches - # in PublicInbox::Thread to fix memory leaks. Since Mail::Thread - # appears unmaintained, I suppose it's safe to depend on these - # variables for now: - no warnings 'once'; - $Mail::Thread::nosubject = $nosubject; - # Keep ghosts with only a single direct child: - $Mail::Thread::noprune = 1; $th->thread; - $th->order(*sort_ts) unless $nosort; + $th->order(*sort_ts); $th } @@ -879,7 +869,7 @@ sub emit_index_topics { my $sres = $state->{srch}->query('', \%opts); my $nr = scalar @{$sres->{msgs}} or last; - for (thread_results(load_results($sres), 1)->rootset) { + for (thread_results(load_results($sres))->rootset) { add_topic($state, $_, 0); } $opts{offset} += $nr; -- cgit v1.2.3-24-ge0c7