Let Index.updateHideLabel keep track of whether Index is enabled rather than its callers.

This commit is contained in:
ccd0 2016-11-08 00:43:52 -08:00
parent 05bffd36c5
commit 88be17aeb1
2 changed files with 3 additions and 2 deletions

View File

@ -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()

View File

@ -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++