typeahead: Rename codepoint to emoji_code.

This commit is contained in:
Harshit Bansal
2018-12-15 19:41:23 +00:00
committed by Tim Abbott
parent 4251543426
commit f8f971bfd6
5 changed files with 22 additions and 22 deletions

View File

@@ -73,7 +73,7 @@ exports.initialize = function initialize() {
_.each(emoji_codes.names, function (value) {
var base_name = emoji_codes.name_to_codepoint[value];
default_emojis.push({emoji_name: value,
codepoint: emoji_codes.name_to_codepoint[value]});
emoji_code: emoji_codes.name_to_codepoint[value]});
if (exports.default_emoji_aliases.hasOwnProperty(base_name)) {
exports.default_emoji_aliases[base_name].push(value);

View File

@@ -156,7 +156,7 @@ exports.render_emoji = function (item) {
if (emoji.active_realm_emojis.hasOwnProperty(item.emoji_name)) {
args.img_src = item.emoji_url;
} else {
args.codepoint = item.codepoint;
args.emoji_code = item.emoji_code;
}
return exports.render_typeahead_item(args);
};
@@ -168,7 +168,7 @@ function emoji_prefix_sort(query, objs, get_item) {
var popular_emoji_matches = [];
var other_emoji_matches = [];
prefix_sort.matches.forEach(function (obj) {
if (emoji.frequently_used_emojis_list.indexOf(obj.codepoint) !== -1) {
if (emoji.frequently_used_emojis_list.indexOf(obj.emoji_code) !== -1) {
popular_emoji_matches.push(obj);
} else {
other_emoji_matches.push(obj);