diff options
author | Eric Wong <e@80x24.org> | 2016-10-14 09:00:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-10-14 21:12:42 +0000 |
commit | 123031737a09edb3297e0fc6ea9e566fc2fecdf5 (patch) | |
tree | 18324713168c363c29ed6b2d918f637184dad1d6 /lib/PublicInbox/SearchView.pm | |
parent | f2b07568e623c2a0aff4d0135617a26c887d2755 (diff) | |
download | public-inbox-123031737a09edb3297e0fc6ea9e566fc2fecdf5.tar.gz |
This reverts commit 3c9dd6619f825f0515e7e4afa1bd55c99c1a68d3 ("thread: fix sorting without topmost") and reinstates the "topmost" routine for sorting purposes.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index cfe6dfff..ebeb41f7 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -155,8 +155,9 @@ sub mset_thread { $th->thread; if ($q->{r}) { # order by relevance $th->order(sub { - [ sort { ( $pct{$b->{id}} || 0) <=> - ( $pct{$a->{id}} || 0) + [ sort { (eval { $pct{$b->topmost->{id}} } || 0) + <=> + (eval { $pct{$a->topmost->{id}} } || 0) } @{$_[0]} ]; }); } else { # order by time (default for threaded view) |