mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
This reverts commit 7aff9806eb3592767313299d7a0b8c413e328d20.
This commit is contained in:

committed by
GitHub

parent
67a7b28096
commit
40d65dddf8
@ -7,7 +7,6 @@ class FlagSettings
|
||||
:topic_flag_types,
|
||||
:auto_action_types,
|
||||
:custom_types,
|
||||
:names,
|
||||
)
|
||||
|
||||
def initialize
|
||||
@ -17,28 +16,18 @@ class FlagSettings
|
||||
@auto_action_types = Enum.new
|
||||
@custom_types = Enum.new
|
||||
@without_custom_types = Enum.new
|
||||
@names = Enum.new
|
||||
end
|
||||
|
||||
def add(
|
||||
id,
|
||||
name_key,
|
||||
topic_type: nil,
|
||||
notify_type: nil,
|
||||
auto_action_type: nil,
|
||||
custom_type: nil,
|
||||
name: nil
|
||||
)
|
||||
@all_flag_types[name_key] = id
|
||||
@topic_flag_types[name_key] = id if !!topic_type
|
||||
@notify_types[name_key] = id if !!notify_type
|
||||
@auto_action_types[name_key] = id if !!auto_action_type
|
||||
@names[id] = name if name
|
||||
def add(id, name, topic_type: nil, notify_type: nil, auto_action_type: nil, custom_type: nil)
|
||||
@all_flag_types[name] = id
|
||||
@topic_flag_types[name] = id if !!topic_type
|
||||
@notify_types[name] = id if !!notify_type
|
||||
@auto_action_types[name] = id if !!auto_action_type
|
||||
|
||||
if !!custom_type
|
||||
@custom_types[name_key] = id
|
||||
@custom_types[name] = id
|
||||
else
|
||||
@without_custom_types[name_key] = id
|
||||
@without_custom_types[name] = id
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user