From 7337412c356aecf411dbe823175e2ec031e73466 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 2 Apr 2016 22:47:02 -0700 Subject: [PATCH] Add global setting to disable Reply Pruning entirely. --- src/General/Config.coffee | 4 ++++ src/Monitoring/ReplyPruning.coffee | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 3252d90ff..a0071387a 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -405,6 +405,10 @@ Config = false 'Label each post from a new IP with the thread\'s current IP count.' ] + 'Reply Pruning': [ + true + 'Hide old replies in long threads. Number of replies shown can be set from header menu. Not compatible with Quote Threading.' + ] 'Posting and Captchas': 'Quick Reply': [ diff --git a/src/Monitoring/ReplyPruning.coffee b/src/Monitoring/ReplyPruning.coffee index a427122b4..7cb060b69 100644 --- a/src/Monitoring/ReplyPruning.coffee +++ b/src/Monitoring/ReplyPruning.coffee @@ -1,6 +1,8 @@ ReplyPruning = init: -> - return unless g.VIEW is 'thread' and not Conf['Quote Threading'] + return unless g.VIEW is 'thread' and Conf['Reply Pruning'] and not Conf['Quote Threading'] + + @container = $.frag() label = UI.checkbox 'Prune Replies', 'Show Last' el = $.el 'span', @@ -38,7 +40,6 @@ ReplyPruning = ReplyPruning.update() setEnabled: -> - ReplyPruning.container or= $.frag() onOff = if Conf['Prune Replies'] then $.on else $.off onOff ReplyPruning.inputs.replies, 'change', ReplyPruning.update onOff d, 'ThreadUpdate', ReplyPruning.update