Make Thread::{hide,show} handle the catalog view.
This commit is contained in:
parent
1f92c2dd6e
commit
785f5b39dc
@ -134,7 +134,7 @@ Index =
|
||||
$.off @el, 'click', @cb if @cb
|
||||
@cb = ->
|
||||
$.event 'CloseMenu'
|
||||
Index.toggleHide post
|
||||
PostHiding.toggle post
|
||||
$.on @el, 'click', @cb
|
||||
true
|
||||
|
||||
@ -166,7 +166,7 @@ Index =
|
||||
return if e.button isnt 0
|
||||
thread = g.threads[@parentNode.dataset.fullID]
|
||||
if e.shiftKey
|
||||
Index.toggleHide thread.OP
|
||||
PostHiding.toggle thread.OP
|
||||
else if e.altKey
|
||||
Index.togglePin thread
|
||||
else
|
||||
@ -194,9 +194,6 @@ Index =
|
||||
offsetX: 15
|
||||
offsetY: -20
|
||||
setTimeout (-> el.hidden = false if el.parentNode), .25 * $.SECOND
|
||||
toggleHide: (post) ->
|
||||
$.rm post.thread.catalogView.nodes.root
|
||||
PostHiding.toggle post
|
||||
togglePin: (thread) ->
|
||||
data =
|
||||
boardID: thread.board.ID
|
||||
|
||||
@ -67,6 +67,7 @@ class Thread
|
||||
@isHidden = true
|
||||
root = @OP.nodes.root.parentNode
|
||||
Index.updateHideLabel()
|
||||
$.rm @catalogView.nodes.root if @catalogView
|
||||
|
||||
unless makeStub
|
||||
root.hidden = true
|
||||
@ -94,6 +95,7 @@ class Thread
|
||||
delete @stub
|
||||
@OP.nodes.root.parentNode.hidden = false
|
||||
Index.updateHideLabel()
|
||||
$.rm @catalogView.nodes.root if @catalogView
|
||||
|
||||
kill: ->
|
||||
@isDead = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user