From b6b86cc599718ec7e9581bcc647bda263f6cbe45 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 11 Feb 2014 12:39:56 +0100 Subject: [PATCH] Close #1439. --- src/General/Index.coffee | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 44960b110..2e9150881 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -235,7 +235,11 @@ Index = if mode not in ['catalog', Conf['Previous Index Mode']] Conf['Previous Index Mode'] = mode $.set 'Previous Index Mode', mode - QR.hide() if QR.nodes and mode is 'catalog' + return unless QR.nodes + if mode is 'catalog' + QR.hide() + else + QR.unhide() sort: -> Index.sort() Index.buildIndex() @@ -534,11 +538,11 @@ Index = when 'bump' sortedThreadIDs = Index.liveThreadIDs when 'lastreply' - sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> + sortedThreadIDs = [Index.liveThreadData...].sort (a, b) -> [..., a] = a.last_replies if 'last_replies' of a [..., b] = b.last_replies if 'last_replies' of b b.no - a.no - ).map (data) -> data.no + .map (data) -> data.no when 'birth' sortedThreadIDs = [Index.liveThreadIDs...].sort (a, b) -> b - a when 'replycount'