remove IndexBuild event
This commit is contained in:
parent
cec3479ab3
commit
5ad30ead3f
@ -4,7 +4,6 @@ ThreadHiding =
|
||||
|
||||
@db = new DataBoard 'hiddenThreads'
|
||||
@syncCatalog()
|
||||
$.on d, 'IndexBuild', @onIndexBuild
|
||||
Thread.callbacks.push
|
||||
name: 'Thread Hiding'
|
||||
cb: @node
|
||||
@ -15,12 +14,10 @@ ThreadHiding =
|
||||
return unless Conf['Thread Hiding Buttons']
|
||||
$.prepend @OP.nodes.root, ThreadHiding.makeButton @, 'hide'
|
||||
|
||||
onIndexBuild: ({detail: nodes}) ->
|
||||
for root, i in nodes by 2
|
||||
onIndexBuild: (nodes) ->
|
||||
for root in nodes
|
||||
thread = Get.threadFromRoot root
|
||||
continue unless thread.isHidden
|
||||
if thread.stub and !root.contains thread.stub
|
||||
# When we come back to a page, the stub is already there.
|
||||
if thread.isHidden and thread.stub and !root.contains thread.stub
|
||||
ThreadHiding.makeStub thread, root
|
||||
return
|
||||
|
||||
|
||||
@ -438,11 +438,9 @@ Index =
|
||||
nodes
|
||||
|
||||
buildStructure: (nodes) ->
|
||||
result = $.frag()
|
||||
i = 0
|
||||
$.add result, [node, $.el 'hr'] while node = nodes[i++]
|
||||
$.event 'IndexBuild', result.children
|
||||
$.add Index.root, result
|
||||
for node in nodes
|
||||
$.add Index.root, [node, $.el 'hr']
|
||||
ThreadHiding.onIndexBuild nodes
|
||||
|
||||
isSearching: false
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user