FIX: Clear appropriate cache when updating font settings (#13582)

Fonts are now included with color definitions, and we need to clear the
correct cache when updating the setting.
This commit is contained in:
Penar Musaraj
2021-06-30 08:59:27 -04:00
committed by GitHub
parent 715ecabd85
commit de6cc7a924
2 changed files with 10 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ DiscourseEvent.on(:site_setting_changed) do |name, old_value, new_value|
end
end
Stylesheet::Manager.clear_core_cache!(["desktop", "mobile"]) if [:base_font, :heading_font].include?(name)
Stylesheet::Manager.clear_color_scheme_cache! if [:base_font, :heading_font].include?(name)
Report.clear_cache(:storage_stats) if [:backup_location, :s3_backup_bucket].include?(name)