]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchView.pm
wwwstream: reduce object graph depth
[public-inbox.git] / lib / PublicInbox / SearchView.pm
index 4fbf59ef2ca080d22db624c393d0db1dcc9084d6..71c3ae707bbfe4fc39d1b02f4f24a2dbc99931f3 100644 (file)
@@ -82,7 +82,7 @@ retry:
                        $cb = mset_summary($ctx, $mset, $q);
                }
        }
-       PublicInbox::WwwStream->response($ctx, $code, $cb);
+       PublicInbox::WwwStream::response($ctx, $code, $cb);
 }
 
 # display non-nested search results similar to what users expect from
@@ -243,8 +243,8 @@ sub search_nav_bot {
 
 sub sort_relevance {
        [ sort {
-               (eval { $b->topmost->{smsg}->{pct} } // 0) <=>
-               (eval { $a->topmost->{smsg}->{pct} } // 0)
+               (eval { $b->topmost->{pct} } // 0) <=>
+               (eval { $a->topmost->{pct} } // 0)
        } @{$_[0]} ]
 }
 
@@ -300,8 +300,8 @@ sub mset_thread_i {
        my ($nr, $ctx) = @_;
        my $msgs = $ctx->{msgs} or return;
        while (my $smsg = pop @$msgs) {
-               $ctx->{-inbox}->smsg_mime($smsg) or next;
-               return PublicInbox::View::index_entry($smsg, $ctx,
+               my $eml = $ctx->{-inbox}->smsg_eml($smsg) or next;
+               return PublicInbox::View::eml_entry($ctx, $smsg, $eml,
                                                        scalar @$msgs);
        }
        my ($skel) = delete @$ctx{qw(skel msgs)};
@@ -340,7 +340,7 @@ sub adump_i {
                my $smsg = eval {
                        PublicInbox::Smsg::from_mitem($mi, $ctx->{srch});
                } or next;
-               $ctx->{-inbox}->smsg_mime($smsg) and return $smsg;
+               return $smsg;
        }
 }