This commit is contained in:
Mayhem 2014-02-11 12:39:56 +01:00
parent ab739fd446
commit b6b86cc599

View File

@ -235,7 +235,11 @@ Index =
if mode not in ['catalog', Conf['Previous Index Mode']] if mode not in ['catalog', Conf['Previous Index Mode']]
Conf['Previous Index Mode'] = mode Conf['Previous Index Mode'] = mode
$.set '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: -> sort: ->
Index.sort() Index.sort()
Index.buildIndex() Index.buildIndex()
@ -534,11 +538,11 @@ Index =
when 'bump' when 'bump'
sortedThreadIDs = Index.liveThreadIDs sortedThreadIDs = Index.liveThreadIDs
when 'lastreply' when 'lastreply'
sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> sortedThreadIDs = [Index.liveThreadData...].sort (a, b) ->
[..., a] = a.last_replies if 'last_replies' of a [..., a] = a.last_replies if 'last_replies' of a
[..., b] = b.last_replies if 'last_replies' of b [..., b] = b.last_replies if 'last_replies' of b
b.no - a.no b.no - a.no
).map (data) -> data.no .map (data) -> data.no
when 'birth' when 'birth'
sortedThreadIDs = [Index.liveThreadIDs...].sort (a, b) -> b - a sortedThreadIDs = [Index.liveThreadIDs...].sort (a, b) -> b - a
when 'replycount' when 'replycount'