mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 21:14:41 +08:00
FEATURE: Calculate sprite-sheet based on currently active themes (#6973)
Previously there was only one sprite sheet, which always included icons from all themes even if they were disabled
This commit is contained in:
@ -7,6 +7,10 @@ class ThemeField < ActiveRecord::Base
|
||||
belongs_to :upload
|
||||
has_one :javascript_cache, dependent: :destroy
|
||||
|
||||
after_commit do |field|
|
||||
SvgSprite.expire_cache if field.target_id == Theme.targets[:settings]
|
||||
end
|
||||
|
||||
scope :find_by_theme_ids, ->(theme_ids) {
|
||||
return none unless theme_ids.present?
|
||||
|
||||
|
Reference in New Issue
Block a user