A platform for community discussion. Free, open, simple.
DEV: Fix live CSS watching when viewing non-default theme
David Taylor16fbbd096a6a
diff --git a/lib/stylesheet/watcher.rb b/lib/stylesheet/watcher.rbindex e2425c4fd72..7d73ec51160 100644--- a/lib/stylesheet/watcher.rb+++ b/lib/stylesheet/watcher.rb@@ -2,16 +2,14 @@ require 'listen'module Stylesheetclass Watcher+ REDIS_KEY = "dev_last_used_theme_id"def self.theme_id=(v)- @theme_id = v+ $redis.set(REDIS_KEY, v)enddef self.theme_id- if @theme_id.blank? && SiteSetting.default_theme_id != -1- @theme_id = SiteSetting.default_theme_id- end- @theme_id+ ($redis.get(REDIS_KEY) || SiteSetting.default_theme_id).to_ienddef self.watch(paths = nil)