Move removal of threads from catalog to ThreadHiding.hide/show.

This allows the call to ThreadHiding.hide in Filter.quickFilterMD5 to work.
This commit is contained in:
ccd0 2016-11-08 00:51:46 -08:00
parent 88be17aeb1
commit fb02a2104a
2 changed files with 2 additions and 1 deletions

View File

@ -183,6 +183,7 @@ ThreadHiding =
threadRoot = thread.nodes.root
thread.isHidden = true
Index.updateHideLabel()
$.rm thread.catalogView.nodes.root if thread.catalogView and !Index.showHiddenThreads
return threadRoot.hidden = true unless makeStub
@ -195,3 +196,4 @@ ThreadHiding =
threadRoot = thread.nodes.root
threadRoot.hidden = thread.isHidden = false
Index.updateHideLabel()
$.rm thread.catalogView.nodes.root if thread.catalogView and Index.showHiddenThreads

View File

@ -213,7 +213,6 @@ Index =
e.preventDefault() # Also on mousedown to prevent highlighting text.
toggleHide: (thread) ->
$.rm thread.catalogView.nodes.root
if Index.showHiddenThreads
ThreadHiding.show thread
return unless ThreadHiding.db.get {boardID: thread.board.ID, threadID: thread.ID}