From 3c9dd6619f825f0515e7e4afa1bd55c99c1a68d3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Oct 2016 23:47:28 +0000 Subject: thread: fix sorting without topmost This bug was hidden, and we may not be able to efficiently implement a topmost subroutine with the hash-based (vs linked-list) based container for threading in the next commit. --- lib/PublicInbox/View.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/View.pm') 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]} ]; } -- cgit v1.2.3-24-ge0c7