Use SortIndex event rather than calling methods in Index.

This commit is contained in:
ccd0 2016-09-17 04:55:38 -07:00
parent 60bb314783
commit 7327588ff8
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,8 @@ Index =
$.addClass doc, 'index-loading', "#{Conf['Index Mode'].replace /\ /g, '-'}-mode" $.addClass doc, 'index-loading', "#{Conf['Index Mode'].replace /\ /g, '-'}-mode"
$.on window, 'popstate', @cb.popstate $.on window, 'popstate', @cb.popstate
$.on d, 'scroll', Index.scroll $.on d, 'scroll', @scroll
$.on d, 'SortIndex', @cb.resort
# Header refresh button # Header refresh button
@button = $.el 'a', @button = $.el 'a',

View File

@ -336,9 +336,8 @@ ThreadWatcher =
for refresher in ThreadWatcher.menu.refreshers for refresher in ThreadWatcher.menu.refreshers
refresher() refresher()
if Index.nodes and Conf['Pin Watched Threads'] and Conf['Index Mode'] is 'catalog' if Conf['Pin Watched Threads'] and Conf['Index Mode'] is 'catalog'
Index.sort() $.event 'SortIndex'
Index.buildIndex()
refreshIcon: -> refreshIcon: ->
for className in ['replies-unread', 'replies-quoting-you'] for className in ['replies-unread', 'replies-quoting-you']