DEV: Add more _map extensions for list site settings (#27045)

Following on from eea74e0e32f704f0756202c3f3ae801bcc8ac8bb,
this commit adds the automatic _map splitting shorthand
for emoji_list, tag_list site settings.
This commit is contained in:
Martin Brennan
2024-05-16 13:43:10 +10:00
committed by GitHub
parent e90e6e8f86
commit d964709644
2 changed files with 12 additions and 2 deletions

View File

@ -584,9 +584,9 @@ module SiteSettingExtension
end
end
# Same logic as above for group_list settings, with the caveat that normal
# Same logic as above for other list type settings, with the caveat that normal
# list settings are not necessarily integers, so we just want to handle the splitting.
if type_supervisor.get_type(name) == :list
if %i[list emoji_list tag_list].include?(type_supervisor.get_type(name))
list_type = type_supervisor.get_list_type(name)
if %w[simple compact].include?(list_type) || list_type.nil?