From 88be17aeb18936a75c08dca83f81a5f43c8b277d Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 8 Nov 2016 00:43:52 -0800 Subject: [PATCH] Let Index.updateHideLabel keep track of whether Index is enabled rather than its callers. --- src/Filtering/ThreadHiding.coffee | 4 ++-- src/General/Index.coffee | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee index a3613e958..75c3333f6 100644 --- a/src/Filtering/ThreadHiding.coffee +++ b/src/Filtering/ThreadHiding.coffee @@ -182,7 +182,7 @@ ThreadHiding = return if thread.isHidden threadRoot = thread.nodes.root thread.isHidden = true - Index.updateHideLabel() if Conf['JSON Index'] + Index.updateHideLabel() return threadRoot.hidden = true unless makeStub @@ -194,4 +194,4 @@ ThreadHiding = delete thread.stub threadRoot = thread.nodes.root threadRoot.hidden = thread.isHidden = false - Index.updateHideLabel() if Conf['JSON Index'] + Index.updateHideLabel() diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 7d032104f..926dee53f 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -518,6 +518,7 @@ Index = $.add strong, a updateHideLabel: -> + return unless Index.hideLabel hiddenCount = 0 for threadID in Index.liveThreadIDs when Index.isHidden(threadID) hiddenCount++