Fix total not being updated when pruning checkbox was disabled. Also simplify.
This commit is contained in:
parent
7337412c35
commit
1b6095ec26
@ -33,16 +33,9 @@ ReplyPruning =
|
|||||||
node: ->
|
node: ->
|
||||||
ReplyPruning.thread = @
|
ReplyPruning.thread = @
|
||||||
ReplyPruning.total = @posts.keys.length - 1
|
ReplyPruning.total = @posts.keys.length - 1
|
||||||
$.on ReplyPruning.inputs.enabled, 'change', ReplyPruning.setEnabled
|
|
||||||
$.on ReplyPruning.inputs.enabled, 'change', ReplyPruning.update
|
$.on ReplyPruning.inputs.enabled, 'change', ReplyPruning.update
|
||||||
if Conf['Prune Replies']
|
$.on ReplyPruning.inputs.replies, 'change', ReplyPruning.update
|
||||||
ReplyPruning.setEnabled()
|
$.on d, 'ThreadUpdate', ReplyPruning.update
|
||||||
ReplyPruning.update()
|
|
||||||
|
|
||||||
setEnabled: ->
|
|
||||||
onOff = if Conf['Prune Replies'] then $.on else $.off
|
|
||||||
onOff ReplyPruning.inputs.replies, 'change', ReplyPruning.update
|
|
||||||
onOff d, 'ThreadUpdate', ReplyPruning.update
|
|
||||||
|
|
||||||
update: (e) ->
|
update: (e) ->
|
||||||
if e and e.type is 'ThreadUpdate' and not e.detail[404]
|
if e and e.type is 'ThreadUpdate' and not e.detail[404]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user