From ecf1ad19baa7b3813e7737714f6f229d5fa0d01b Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 12 Feb 2016 00:29:36 -0800 Subject: [PATCH] Make thread watcher keybinds handle case when thread watcher is disabled. --- src/Miscellaneous/Keybinds.coffee | 3 ++- src/Monitoring/ThreadWatcher.coffee | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 4d540856a..4bb527170 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -92,9 +92,10 @@ Keybinds = else return when Conf['Watch'] - return unless thread + return unless ThreadWatcher.enabled and thread ThreadWatcher.toggle thread when Conf['Update thread watcher'] + return unless ThreadWatcher.enabled ThreadWatcher.buttonFetchAll() # Images when Conf['Expand image'] diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 662094edb..39bb5b61d 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -1,6 +1,6 @@ ThreadWatcher = init: -> - return if !Conf['Thread Watcher'] + return unless (@enabled = Conf['Thread Watcher']) @shortcut = sc = $.el 'a', id: 'watcher-link'