Revert "DEV: move post flags into database (#26951)" (#27102)

This reverts commit 7aff9806eb3592767313299d7a0b8c413e328d20.
This commit is contained in:
Krzysztof Kotlarek
2024-05-21 16:21:07 +10:00
committed by GitHub
parent 67a7b28096
commit 40d65dddf8
28 changed files with 83 additions and 346 deletions

View File

@ -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