build_emoji: Remove the hack used for displaying flag emojis correctly.

This hack was used to fix the broken flag emojis in emoji-picker.
It was broken due to the incomplete migration to iamcal dataset.
See issue #4775 for more details.
This commit is contained in:
Harshit Bansal 2017-09-28 17:13:32 +00:00 committed by Tim Abbott
parent 5b5bcce098
commit 0940d2cf85
2 changed files with 0 additions and 17 deletions

View File

@ -54,12 +54,6 @@ exports.update_emojis = function update_emojis(realm_emojis) {
exports.emojis_name_to_css_class[emoji.emoji_name] = css_class;
exports.emojis_by_name[emoji.emoji_name] = emoji.emoji_url;
});
// Code for patching CSS classes for flag emojis so that they render
// properly in emoji picker. Remove after migration to iamcal dataset
// is complete.
_.each(emoji_codes.patched_css_classes, function (css_class, name) {
exports.emojis_name_to_css_class[name] = css_class;
});
exports.emojis_by_unicode = {};
_.each(default_unicode_emojis, function (emoji) {
exports.emojis_by_unicode[emoji.emoji_name] = emoji.emoji_url;

View File

@ -36,8 +36,6 @@ exports.codepoint_to_name = %(codepoint_to_name)s;
exports.emoji_catalog = %(emoji_catalog)s;
exports.patched_css_classes = %(patched_css_classes)s;
return exports;
}());
if (typeof module !== 'undefined') {
@ -208,14 +206,6 @@ def generate_map_files(cache_path, emoji_map, emoji_data, emoji_catalog, unified
up_index = names.index('thumbs_up')
names[down_index], names[up_index] = ('thumbs_up', 'thumbs_down')
# Patch CSS classes of flag emojis.
patched_css_classes = {}
for emoji in emoji_data:
if emoji['category'] == 'Flags':
for name in emoji['short_names']:
if name in emoji_map:
patched_css_classes[str(name)] = str(emoji['unified'].lower())
name_to_codepoint = {name: unified_reactions_data[name] for name in names}
codepoint_to_name = generate_codepoint_to_name_map(names, unified_reactions_data)
@ -225,7 +215,6 @@ def generate_map_files(cache_path, emoji_map, emoji_data, emoji_catalog, unified
'name_to_codepoint': name_to_codepoint,
'codepoint_to_name': codepoint_to_name,
'emoji_catalog': emoji_catalog,
'patched_css_classes': patched_css_classes
})
emoji_codes_file.close()