FIX: Live refresh parent themes when editing child themes
This commit is contained in:
parent
16fbbd096a
commit
260398d706
|
@ -242,7 +242,8 @@ class Theme < ActiveRecord::Base
|
||||||
if all_themes
|
if all_themes
|
||||||
message = theme_ids.map { |id| refresh_message_for_targets(targets, id) }.flatten
|
message = theme_ids.map { |id| refresh_message_for_targets(targets, id) }.flatten
|
||||||
else
|
else
|
||||||
message = refresh_message_for_targets(targets, theme_ids).flatten
|
parent_ids = Theme.where(id: theme_ids).joins(:parent_themes).pluck(:parent_theme_id).uniq
|
||||||
|
message = refresh_message_for_targets(targets, theme_ids | parent_ids).flatten
|
||||||
end
|
end
|
||||||
|
|
||||||
MessageBus.publish('/file-change', message)
|
MessageBus.publish('/file-change', message)
|
||||||
|
|
Loading…
Reference in New Issue