about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-10-03 19:43:30 +0000
committerEric Wong <e@80x24.org>2017-10-03 20:00:41 +0000
commit38c481a5438593cff686709493a70b8a6b3033d1 (patch)
treec288246c52611759bfddcbb4bb371a3bd1bb789e /lib/PublicInbox/View.pm
parent2aa29ee6a35f5be2d76c39ccc50bf7a34075e2bd (diff)
downloadpublic-inbox-38c481a5438593cff686709493a70b8a6b3033d1.tar.gz
Since we attempt to fill in threads by Subject, our thread
skeletons can cross actual thread IDs, leading to the
possibility of false ghosts showing up in the skeleton.
Try to fill in the ghosts as well as possible by performing
a message lookup.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index b39c8203..ac7657ae 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -370,7 +370,7 @@ sub thread_html {
         $ctx->{mapping} = {};
         $ctx->{s_nr} = "$nr+ messages in thread";
 
-        my $rootset = thread_results($msgs);
+        my $rootset = thread_results($msgs, $srch);
 
         # reduce hash lookups in pre_thread->skel_dump
         my $inbox = $ctx->{-inbox};
@@ -607,7 +607,7 @@ sub thread_skel {
         # reduce hash lookups in skel_dump
         my $ibx = $ctx->{-inbox};
         $ctx->{-obfs_ibx} = $ibx->{obfuscate} ? $ibx : undef;
-        walk_thread(thread_results($sres), $ctx, *skel_dump);
+        walk_thread(thread_results($sres, $srch), $ctx, *skel_dump);
 
         $ctx->{parent_msg} = $parent;
 }
@@ -736,9 +736,9 @@ sub msg_timestamp {
 }
 
 sub thread_results {
-        my ($msgs) = @_;
+        my ($msgs, $srch) = @_;
         require PublicInbox::SearchThread;
-        PublicInbox::SearchThread::thread($msgs, *sort_ts);
+        PublicInbox::SearchThread::thread($msgs, *sort_ts, $srch);
 }
 
 sub missing_thread {
@@ -1000,7 +1000,7 @@ sub index_topics {
         my $nr = scalar @{$sres->{msgs}};
         if ($nr) {
                 $sres = load_results($srch, $sres);
-                walk_thread(thread_results($sres), $ctx, *acc_topic);
+                walk_thread(thread_results($sres, $srch), $ctx, *acc_topic);
         }
         $ctx->{-next_o} = $off+ $nr;
         $ctx->{-cur_o} = $off;