discourse/app/models/emoji_set_site_setting.rb
Penar Musaraj 45c5fd2172
DEV: Remove JoyPixels emoji option (#12197)
- removes the option from site settings
- deletes the site setting on existing sites that have it
- marks posts using emojis as requiring a rebake

Note that the actual image files are not removed here, the plan is to
remove them in a few weeks/months (when presumably the rebaking of old
posts has been completed).
2021-02-26 07:44:52 -05:00

27 lines
654 B
Ruby

# frozen_string_literal: true
require 'enum_site_setting'
class EmojiSetSiteSetting < EnumSiteSetting
def self.valid_value?(val)
values.any? { |v| v[:value] == val.to_s }
end
def self.values
@values ||= [
{ name: 'emoji_set.apple_international', value: 'apple' },
{ name: 'emoji_set.google', value: 'google' },
{ name: 'emoji_set.twitter', value: 'twitter' },
{ name: 'emoji_set.win10', value: 'win10' },
{ name: 'emoji_set.google_classic', value: 'google_classic' },
{ name: 'emoji_set.facebook_messenger', value: 'facebook_messenger' },
]
end
def self.translate_names?
true
end
end