From ab2ea29dd6597e70a8d0f52f73c1cd5bb2bda3ab Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 19 Feb 2014 05:06:03 +0100 Subject: [PATCH] Hiding threads should be able to hide other posts recursively too. --- src/General/Post.coffee | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/General/Post.coffee b/src/General/Post.coffee index 3d4ebe90d..7591ed653 100644 --- a/src/General/Post.coffee +++ b/src/General/Post.coffee @@ -163,17 +163,19 @@ class Post @labels.push label unless label in @labels return if @isHidden @isHidden = true + for quotelink in Get.allQuotelinksLinkingTo @ $.addClass quotelink, 'filtered' - if !@isReply - @thread.hide() - return if hideRecursively label = "Recursively hidden for quoting No.#{@}" Recursive.apply 'hide', @, label, makeStub, true Recursive.add 'hide', @, label, makeStub, true + if !@isReply + @thread.hide() + return + unless makeStub @nodes.root.hidden = true return @@ -194,16 +196,18 @@ class Post @labels = @labels.filter (label) -> # This is lame. !/^(Manually hidden|Recursively hidden|Hidden by)/.test label + for quotelink in Get.allQuotelinksLinkingTo @ $.rmClass quotelink, 'filtered' - if !@isReply - @thread.show() - return if showRecursively Recursive.apply 'show', @, true Recursive.rm 'hide', @ + if !@isReply + @thread.show() + return + unless @nodes.stub @nodes.root.hidden = false return