diff options
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 5 | ||||
-rw-r--r-- | lib/PublicInbox/View.pm | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index ebeb41f7..cfe6dfff 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -155,9 +155,8 @@ sub mset_thread { $th->thread; if ($q->{r}) { # order by relevance $th->order(sub { - [ sort { (eval { $pct{$b->topmost->{id}} } || 0) - <=> - (eval { $pct{$a->topmost->{id}} } || 0) + [ sort { ( $pct{$b->{id}} || 0) <=> + ( $pct{$a->{id}} || 0) } @{$_[0]} ]; }); } else { # order by time (default for threaded view) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 7554d54f..c09b4a22 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -857,8 +857,8 @@ sub skel_dump { sub sort_ts { [ sort { - (eval { $a->topmost->{smsg}->ts } || 0) <=> - (eval { $b->topmost->{smsg}->ts } || 0) + (eval { $a->{smsg}->ts } || 0) <=> + (eval { $b->{smsg}->ts } || 0) } @{$_[0]} ]; } |