mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
DEV: Improve support for extending flags. (#8619)
- Ensure that the 'notify_moderators' flag is always the last flag when using custom flags. - Support passign a custom FlagSettings object when replacing flags to reuse existing ones.
This commit is contained in:
parent
c25b8abd70
commit
16d97573f9
3 changed files with 16 additions and 6 deletions
|
@ -127,8 +127,7 @@ class Plugin::Instance
|
|||
end
|
||||
|
||||
# Applies to all sites in a multisite environment. Ignores plugin.enabled?
|
||||
def replace_flags
|
||||
settings = ::FlagSettings.new
|
||||
def replace_flags(settings: ::FlagSettings.new)
|
||||
yield settings
|
||||
|
||||
reloadable_patch do |plugin|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue