Improve stub restoration.
This commit is contained in:
parent
1fc0c94f7d
commit
1927cbfe11
@ -4,7 +4,7 @@ ThreadHiding =
|
|||||||
@db = new DataBoard 'hiddenThreads'
|
@db = new DataBoard 'hiddenThreads'
|
||||||
return @catalogWatch() if g.VIEW is 'catalog'
|
return @catalogWatch() if g.VIEW is 'catalog'
|
||||||
@catalogSet g.BOARD
|
@catalogSet g.BOARD
|
||||||
$.on d, 'IndexBuild', @onIndexBuild
|
$.on d, 'IndexRefresh', @onIndexRefresh
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Thread Hiding'
|
name: 'Thread Hiding'
|
||||||
cb: @node
|
cb: @node
|
||||||
@ -49,12 +49,11 @@ ThreadHiding =
|
|||||||
return unless Conf['Thread Hiding Buttons']
|
return unless Conf['Thread Hiding Buttons']
|
||||||
$.prepend @nodes.root, ThreadHiding.makeButton(@thread, 'hide')
|
$.prepend @nodes.root, ThreadHiding.makeButton(@thread, 'hide')
|
||||||
|
|
||||||
onIndexBuild: ->
|
onIndexRefresh: ->
|
||||||
for root in $$ '.board > .thread'
|
g.BOARD.threads.forEach (thread) ->
|
||||||
thread = Get.threadFromRoot root
|
{root} = thread.nodes
|
||||||
if thread.isHidden and thread.stub and !root.contains thread.stub
|
if thread.isHidden and thread.stub and !root.contains(thread.stub)
|
||||||
ThreadHiding.makeStub thread, root
|
ThreadHiding.makeStub thread, root
|
||||||
return
|
|
||||||
|
|
||||||
menu:
|
menu:
|
||||||
init: ->
|
init: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user